How to install sun-java5-jdk on Ubuntu 9.10

ReMark from http://www.zooyoo.org/?p=10442

执行sudo gedit /etc/apt/sources.list,

添加以下内容,将9.10的源改成9.04的源。

deb http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-updates main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-backports main restricted universe multiverse

deb http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse

deb-src http://run.hit.edu.cn/ubuntu/ jaunty-security main restricted universe multiverse


然后sudo apt-get update,再用sudo apt-get install sun-java5-jdk

安装后的基本设置: sudo update-alternatives --config java

                                    sudo update-java-alternatives -s java-1.5.0-sun

这时候再用java -version就能看到java 1.5已经正常工作了

最后把源换回9.10的!
http://hi.baidu.com/jackyu/blog/item/5370af0f150d71e6aa645784.html

2010-12-16-10-02

你可能感兴趣的:(java,jdk,Security,ubuntu,sun)