Change the default Java Runtime on Ubuntu
12 November 2008
No Comment
As you know, under linux, you can have multiple application versions (you can have 2 C++ compilers, or 4 java runtimes ) in the same time on your system.
So how can you choose the right Java runtime if you have multiple installation Java applications?
Under Ubuntu / Debian just run update-alternatives command:
update-alternatives --config java There are 5 alternatives which provide `java'. Selection Alternative ----------------------------------------------- 1 /usr/lib/jvm/java-6-sun/jre/bin/java + 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 3 /usr/bin/gij-4.1 4 /usr/lib/jvm/java-gcj/jre/bin/java 5 /usr/bin/gij-4.2Press enter to keep the default[*], or type selection number:
and now just choose what Java runtime do you want to use.
The same is if you want to choose your C compiler or other application, just replace java with gcc or with the name of your application.























Leave your response!