Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

To install java on debian 6, I used

add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

The installation finished without any errors. But when I test the current version (java --version), I still get 1.5.0, and not 1.6.x?! Where is the mistake? Do I have to perform some other steps to install Java 6?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

On Debian and Debian-based systems usually /usr/bin/java is just a symlink to /etc/alternatives/java. The reason for this design is that many versions of the same software can coexist together (in your case Java 1.5 and 1.6).


sudo update-alternatives --config java

to choose default Java version.

For further information on updates-alternatives see:


share|improve this answer
Nice, thank you very much!! –  strauberry May 9 '11 at 9:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.