United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
Red Hat Enterprise Linux now comes with two different implementations of Java™, IBM's 1.4.2 Java release and BEA's JRockit 1.4.2_04.
These new Java™ packages use the alternatives system to abstract the locations and "brands" of your Java™ runtimes and are designed to eliminate the need for environment tweaking.
For example, the Java™ runtimes are now put in:
/usr/lib/jvm/java-[version]-[vendor]-[release]/bin/java
ie: /usr/lib/jvm/java-1.4.2-ibm-1.4.2.0/bin/java
However, instead of pointing to:
/usr/lib/jvm/java-1.4.2-ibm-1.4.2.0/bin/java
which could be out of date or replaced by a different Java™ implementations, there is a symbolic link from:
/usr/bin/java -> /etc/alternatives/java
Since java and javac are available in /usr/bin and the java plugin is installed in the proper location, there is no need to set up your $JAVA_HOME and add $JAVA_HOME/bin to the $PATH, like you had to in the past.
The alternatives directory contains a symbolic link to the actual location of the Java™ runtimes.
/etc/alternatives/java ->
/usr/lib/jvm/java-1.4.2-ibm-1.4.2.0/bin/java
The alternatives system automatically maintains the current links on a priority based system. If the default is not desirable, then you can manually set the symlinks to a lower-priority alternative.
This configuration adds a layer of abstraction so you can update, switch versions, and/or switch vendors with out breaking applications.
For more information on the alternatives system see the man page for alternatives, man alternatives from the command line.