Appendix B. Installing a Java Development Kit

If installing on Red Hat Enterprise Linux, it's recommended to obtain it from the Red Hat Network (RHN). If you have difficulties subscribing to the correct software channels in Red Hat Network, refer to the Red Hat Network Help Desk at https://rhn.redhat.com/rhn/help/ or contact Red Hat Support via http://access.redhat.com directly for assistance.

B.1. Oracle JDK on Red Hat Enterprise Linux 5 and 6

Use this procedure to install the Oracle Java Development Kit on Red Hat Enterprise Linux 5 or Red Hat Enterprise Linux 6.

Important

The following commands must be run as root.

Procedure B.1. Installing Oracle JDK on Red Hat Enterprise Linux 5 and 6

  1. Subscribe to the Supplementary Server channel.

    The Oracle Java Development Kit is available in the Supplementary Server channel.
  2. Install the Oracle JDK package.

    Issue one of the following commands to install the respective Oracle Java Development Kit package:
    # yum install java-1.6.0-sun-devel
    # yum install java-1.7.0-oracle-devel
  3. Set Oracle JDK as the system's default Java Development Kit.

    You can use the alternatives tools to select the default JDK as well as to verify the setting (refer to Section B.6, “Setting the default JDK with the alternatives Utility”).