sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer
sudo apt install oracle-java8-set-default
[......]
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer
sudo apt install oracle-java8-set-default
[......]
当前使用web8源的方式已经失效了,还是需要手动解压缩安装。
1 下载
https://www.oracle.com/hk/java/technologies/javase/javase8-archive-downloads.html
下载 jdk-8u202-linux-x64.tar.gz
2 解压缩
sudo mkdir /usr/java
sudo tar -xf ./jdk-8u202-linux-x64.tar.gz -C /usr/java
3 修改环境变量[......]