ubuntu 安裝oracle jdk 8

1. 先到oracle網站下載

https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
下載 jdk-version-linux-x64.tar.gz 

2.   解開 tgz

sudo tar zxvf jdk-version-linux-x64.tar.gz -C /usr/lib/jvm

3. 安裝到 update-alternatives

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_version/bin/java" 1

4. 設定oracle java

sudo update-alternatives --config java 

發表迴響