- 從官網下載JDK,.tar.gz 的版本
- sudo mv ./jdk1.7.0_xx /usr/lib/jvm/jdk1.7.0 //將 jdk1.7.0_xx 資料夾移到 /usr/lib
- Run:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1 - 選擇預設Java:
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config java- java -version //檢查java版本
- 開啟firefox plugin
32 bit:
sudo ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins
64 bit:sudo ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins
移除:
from:
http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
http://www.devsniper.com/how-to-update-sun-jdk-7-on-ubuntu-12-04/
- Run:
sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac"
sudo update-alternatives --remove "java" /usr/lib/jvm/jdk1.7.0/bin/java"
sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" - 移除plugin:
sudo rm /usr/lib/mozilla/plugins/libnpjp2.so
from:
http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
http://www.devsniper.com/how-to-update-sun-jdk-7-on-ubuntu-12-04/
沒有留言:
張貼留言