Home » Debian, Java, Linux, Ubuntu

Change the default Java Runtime on Ubuntu

12 November 2008 2 Comments

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.2

Press 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.


BlinkList Diigo Digg Facebook Furl Google Mister Wong Newsvine Reddit StumbleUpon Simpy Technorati Yahoo DZone

Hide Bookmarks

2 Comments »

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.