Ubuntu (10.04) only supports Java 1.6 (and prefers OpenJDK too). Here's how to get Sun Java 1.5 installed on Ubuntu 10.04:
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/1.6:
sudo apt-get install sun-java5-jdk
sudo apt-get install sun-java6-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
or
sudo update-java-alternatives -s java-1.6.0-sun
没有评论:
发表评论