安裝oracle jdk8,有2個方式:html
如今PPA安裝不了。下面是下載安裝。java
##下載 wget https://download.oracle.com/otn/java/jdk/8u211-b12/478a62b7d4e34b78b671c754eaaf38ab/jdk-8u211-linux-x64.tar.gz?AuthParam=1560846470_5315db552b4d3ae583bff3d5c4f49ad0 ##更名 mv 'jdk-8u211-linux-x64.tar.gz?AuthParam=1560846470_5315db552b4d3ae583bff3d5c4f49ad0' jdk-8u211-linux-x64.tar.gz ##解壓 tar -xf jdk-8u211-linux-x64.tar.gz
vim /etc/profile
,或者做用於當前用戶vim ~/.bashrc
:export JAVA_HOME=/home/xxx/tmp/jdk1.8.0_211 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH
source /etc/profile
參考文檔: https://codeday.me/bug/20190318/766142.html
https://blog.csdn.net/u012203028/article/details/79498416
http://www.amzport.com/blog/ubuntu-jdk-ppalinux