![如何在 Ubuntu 18.04 64Bit 上安装 JDK8](https://linux22.com/image/1157146/%E5%A6%82%E4%BD%95%E5%9C%A8%20Ubuntu%2018.04%2064Bit%20%E4%B8%8A%E5%AE%89%E8%A3%85%20JDK8%20.png)
我的电脑上有软件包 jdk-8u171-linux-x64.tar.gz,如何在 Ubuntu 18.04 LTS 上安装它
答案1
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get -y install oracle-java8-installer
java -version