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.

I have just installed the openjdk-7-jdk and openjdk-7-jre packages on my Debian box that already had OpenJDK 6 installed on it. However, when I look at my Java version, I see that it shows OpenJDK 6:

bui@debian:~$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-2)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

I did a bit of searching but found no answer on how to "replace" the old version with the new one (I did find a solution for Ubuntu but the command used there isn't available for me).

Could anyone tell me how I should proceed?

share|improve this question
What command is unavailable? update-java-alternatives? If yes, why? –  Artyom Kazak Jul 24 '12 at 0:17
It doesn't exist for me. –  Alex Jul 24 '12 at 1:55
On my Debian Squeeze box, it is provided by java-common package. Check if it is listed in “Installed Files” for java-common, and if it is present in /usr/sbin/. I just checked, on my box it is only available under root for some reason — maybe the situation is the same for you? –  Artyom Kazak Jul 24 '12 at 2:07
Now I get this when setting the alternative: update-alternatives: error: alternative /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so for mozilla-javaplugin.so not registered, not setting. –  Alex Jul 24 '12 at 2:25
add comment

Your Answer


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

Browse other questions tagged or ask your own question.