Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Applications > Developer Suite > Issue <<  2 of 22 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 3622
Last update: 05-11-06
Issue:
How do I configure my Java™ Environment?
Resolution:

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.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Applications > Developer Suite > Issue <<   2  of  22  >>