Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To install java on debian 6, I used

add-apt-repository "deb 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
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.