Download the RPM for the 64 bit version from http://www.oracle.com/technetwork/java/javase/downloads/index.html
Next install it on your computer by typing in a terminal window:
yum localinstall jdk*.rpm <enter>
Once that is done, you need to now set up the alternatives to the OpenJDK version that is on your system. To change the alternatives, follow the steps as below:
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000 <enter>
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000 <enter>
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000 <enter>
Do the steps below if you installed the Java SDK on your computer.
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 <enter>
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000 <enter>
You can check the Java installation by following the steps below.
alternatives --config java <enter>
After entering above command, select the Oracle Java executable as shown below:
There are 2 programs which provide ‘java’.
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
Enter to keep the current selection[+], or type selection number:
alternatives --config libjavaplugin.so.x86_64 <enter>