Sharing

2012年5月8日 星期二

Oracle Java 7 on Ubuntu 12.04



方式一
pjack@ubuntu:~$ sudo apt-get update sudo add-apt-repository ppa:webupd8team/java
pjack@ubuntu:~$ sudo apt-get update
pjack@ubuntu:~$ sudo apt-get install oracle-java7-installer
pjack@ubuntu:~$ mkdir -p ~/.mozilla/plugins
pjack@ubuntu:~$ ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

方式二
# Download jdk-7-linux-i586.tar.gz or jdk-7-linux-x64.tar.gz
# And then unzip to /usr/lib/jvm
pjack@ubuntu:~$ sudo mkdir -p  /usr/lib/jvm/ 
pjack@ubuntu:~$ sudo mv java-7-oracle/ /usr/lib/jvm/
pjack@ubuntu:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
pjack@ubuntu:~$ sudo apt-get update
pjack@ubuntu:~$ sudo apt-get install update-java
pjack@ubuntu:~$ sudo update-java
# 選擇你的版本
pjack@ubuntu:~$ ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/





Reference:
http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7
http://askubuntu.com/questions/56104/how-can-i-install-oracle-java-jre-7
http://jackden-diary.blogspot.com/2012/05/install-oracle-java-7-on-ubuntu-1204-by.html

沒有留言: