在ubuntu 11.10上安装Sun JDK

由于版权问题,ubuntu 11.10上再也不能直接找到(Oracle) Sun JDK了。需要添加一个特殊的源。

  • 方法1:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
sudo update-alternatives –config java

安装完之后,就可已使用sun的jdk了。

  • 方法 2

从下面链接地址下载sun-java的安装包,最后的版本是针对9.10的。
http://mirrors.sohu.com/ubuntu/pool/multiverse/s/sun-java6/
根据下面的抓屏图片,下载对应的依赖包.
sun-java6 on ubuntu 11.10
下载之后,放在一个目录中,执行下面命令 :

dpkg -i *.deb
sudo update-alternatives –config java

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>