20090629 using suns jdk rpm on centosrhel - plembo/onemoretech GitHub Wiki

title: Using Sun's JDK rpm on CentOS/RHEL link: https://onemoretech.wordpress.com/2009/06/29/using-suns-jdk-rpm-on-centosrhel/ author: lembobro description: post_id: 293 created: 2009/06/29 20:28:03 created_gmt: 2009/06/29 20:28:03 comment_status: open post_name: using-suns-jdk-rpm-on-centosrhel status: publish post_type: post

Using Sun's JDK rpm on CentOS/RHEL

Up until recently it was my practice to download the Linux version of Sun's JDK, do a "tar -czf" against it and then run the alternatives command to set up the links. Since returning to CentOS from Ubuntu I decided to give the Sun rpm a try instead. The basic process was the same, the main difference being that by default Sun now creates a /usr/java/jdk-[version] directory with the JDK distribution in it and two symlinks. The aforementioned JDK directory is symlinked to /usr/java/latest and then this link is itself linked to /usr/java/default When running alternatives what I've been doing is to specify /usr/java/default/bin/java for the java executable, like this:

/usr/sbin/alternatives --install /usr/bin/java java 
/usr/java/default/bin/java 300

and then select the new install when configuring:

/usr/sbin/alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 2           /usr/java/default/bin/java

For desktop machines the only remaining task is symlinking the Java plugin from /usr/java/default/jre/plugin/i386/ns7 to /usr/lib/mozilla/plugins.

Copyright 2004-2019 Phil Lembo