The results and ramblings of research

phewww!

SUN Java, update-alternatives on CentOS

with 5 comments

There seem to be too many version of java on my machine right now. To add to my misery there is openjdk, gcj, sun java 1.4, 1.5, 1.6 all install. However unix allows for quick configuration of jvms using update-alternatives.
To install/ register a JVM use the following

/usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/default/bin/java" 2
/usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/default/bin/javac" 2

And to configure systemwide changes use

/usr/sbin/alternatives --configure java
/usr/sbin/alternatives --configure javac

Written by anujjaiswal

June 14, 2011 at 9:27 pm

Posted in JAVA

Tagged with , ,

5 Responses

Subscribe to comments with RSS.

  1. nice, this is just what i needed. Thanks!

    john

    November 17, 2011 at 1:13 am

  2. [...] See this blog [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.