Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to have two JDKs. The first one was installed a long time ago to /usr/lib/jvm/java-7-oracle/. I installed the second version and executed following commands to add it to alternatives:

red-planet@laptop:~$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java_1.6.0_35/bin/java" 2
update-alternatives: using /opt/java_1.6.0_35/bin/java to provide /usr/bin/java (java) in auto mode.
red-planet@laptop:~$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java_1.6.0_35/bin/javac" 2
update-alternatives: using /opt/java_1.6.0_35/bin/javac to provide /usr/bin/javac (javac) in auto mode.
red-planet@laptop:~$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java_1.6.0_35/bin/javaws" 2
update-alternatives: using /opt/java_1.6.0_35/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.

And configured:

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                 Priority   Status
------------------------------------------------------------
* 0            /opt/java_1.6.0_35/bin/java           2         auto mode
  1            /opt/java_1.6.0_35/bin/java           2         manual mode
  2            /usr/lib/jvm/java-7-oracle/bin/java   1         manual mode

Press enter to keep the current choice[*], or type selection number: 

Why do I have two equal items in the list?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.