update-java-alternatives vs update-alternatives --config java

Posted by Stan Smith on Ask Ubuntu See other posts from Ask Ubuntu or by Stan Smith
Published on 2013-07-02T22:32:03Z Indexed on 2013/07/02 23:18 UTC
Read the original article Hit count: 363

Filed under:
|

Thanks in advance from this Ubuntu noob...

On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7.

From my understanding I need to manually choose which Java to use before running each application. This led me to the 'update-java-alternatives -l' command... when I run this I only see the following:

java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64

...but when I run 'update-alternatives --config java' I see the following:

*0  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   auto mode
1  /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   manual mode
2  /usr/lib/jvm/jdk1.7.0/bin/java                   manual mode
3  /usr/lib/jvm/jre1.7.0/bin/java                   manual mode

I don't understand why the update-java-alternatives doesn't display the same 3 options. I also don't understand how to switch between OpenJDK6 and JDK7. Can someone please explain how I can go about using the OpenJDK6 for Arduino development and Sun JDK7 for Eclipse/Android development?

Thank you in advance for any assistance or feedback you can offer.

Stan

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about java