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已经正常工作了