---Install Oracle Java 11 SE under Ubuntu


Currently ( 2020-07-09 20:32:55 ) Java 11 is very very popular and stable version.  Oracle provide the binary version of it also
If you install it, your Eclipse and Android studio will fly quickly.

But I found that Android still use Java8 JRE packed in its publication.  If I swictch to Orcale Java 11.07.  I cannot see the difference. 

I tried hard to find out the installation method of oracle because most of  the links about it are very very old cannot work current,
the below links I think should work.

The two links below almost the same, you should read either of them.

http://ubuntuhandbook.org/index.php/2018/11/how-to-install-oracle-java-11-in-ubuntu-18-04-18-10/
https://www.infoworld.com/article/3514725/installing-oracle-java-se-11-on-ubuntu-18-04.html

You need to download tar ball from:
https://www.oracle.com/java/technologies/javase-jdk11-downloads.html#
after the downloading of this tarball, you need to verify it it as per: 
https://www.oracle.com/webfolder/s/digest/11-0-7-checksum.html

 sudo add-apt-repository ppa:linuxuprising/java
sudo apt install oracle-java11-installer-local
sudo apt install oracle-java11-set-default-local


#please lock the the two packages in case they are upgraded by new version
echo  oracle-java11-set-default-local   hold | sudo dpkg  --set-selections
echo oracle-java11-installer-local  hold | sudo dpkg  --set-selections
 

原文地址:https://www.cnblogs.com/bzhao/p/13276050.html