现在的位置: 首页 > 综合 > 正文

How to install Sun Java 1.5 on Ubuntu 10.04

2013年10月12日 ⁄ 综合 ⁄ 共 616字 ⁄ 字号 评论关闭
Add the following to /etc/apt/sources.list:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse


Update the package list:

sudo apt-get update


Install Sun Java 1.5:

sudo apt-get install sun-java5-jdk


Depending on your setup you might need to set this as the default. Check what version is default:

java -version


And list all Java versions installed:

sudo update-java-alternatives -l


Then if necessary:

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


If you want to get Sun Java 1.6 installed, instead of OpenJDK, just enable the partner repositories in the Package Manager > Software Sources and it will show up in the list for you to install.

抱歉!评论已关闭.