Java & Linux Wytze on 12 Mar 2009 02:08 pm
Update-alternatives
Having multiple jvm’s on your linux machine can be a pain in the ass. To select which jvm to use you can use the update-alternatives command. A small example of how to add a jvm to the alternatives here:
update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_11/bin/java 16011
This will add an entry for your jdk into the alternatives. The last number assigns the priority to this alternative. Which is the version and build number of the relase.
After adding you can use the following command to select the java version you want to use:
update-alternatives --config javaIf you switch the java update-alternatives to auto it will automatically pick the java alternative with the highest priority.
on 22 Apr 2009 at 8:40 pm 1.Dixie said …
Good post.
on 24 Apr 2009 at 8:39 am 2.Wytze said …
Thank you