Use the following instructions to manually install OpenJDK 7:
Check the version. From a terminal window, type:
java -version
(Optional) Uninstall the Java package if the JDK version is less than 7.
rpm -qa | grep java yum remove {java-1.*}
(Optional) Verify that the default Java package is uninstalled.
which java
Download OpenJDK 7 RPMs. From the command-line, run:
yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel
Create symbolic links (symlinks) to the JDK.
mkdir /usr/java ln -s /usr/openjdk1.7.0/openjdk1.7.0 /usr/java/default ln -s /usr/java/default/bin/java /usr/bin/java
Set up your environment to define
JAVA_HOME
to put the Java Virtual Machine and the Java compiler on your path.export JAVA_HOME=/usr/java/default export PATH=$JAVA_HOME/bin:$PATH
Verify if Java is installed in your environment. Execute the following from the command-line console:
java -version
You should see output similar to the following:
openjdk version "1.7.0" OpenJDK Runtime Environment (build 1.7.0) OpenJDK Client VM (build 20.6-b01, mixed mode)