B.2. OpenJDK on Red Hat Enterprise Linux 5 and 6
Use this procedure to install OpenJDK on Red Hat Enterprise Linux 5 or Red Hat Enterprise Linux 6.
Important
The following commands must be run as
root
.
Procedure B.2. Installing OpenJDK on Red Hat Enterprise Linux 5 and 6
Subscribe to the
base
channel.The OpenJDK is available in Red Hat Enterprise Linux'sbase channel
.Install the OpenJDK package.
Issue one of the following commands to install the respective OpenJDK package:# yum install java-1.6.0-openjdk-devel
# yum install java-1.7.0-openjdk-devel
Set OpenJDK as the system's default Java Development Kit.
You can use thealternatives
tools to select the default JDK or verify the setting (refer to Section B.6, “Setting the default JDK with the alternatives Utility”).