Had to learn this one from this site.
In my use case I only want to compile and run Hadoop application so I have not completed all the steps for the browser setup.
- Download the JDK of your choice; I picked 1.7.0_51
- sudo rpm -Uvh /tmp/jdk-7u51-linux-x64.rpm
- sudo alternatives –install /usr/bin/java java /usr/java/latest/bin/java 200000
- sudo alternatives –install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
- sudo alternatives –install /usr/bin/jar jar /usr/java/latest/bin/jar 200000
- sudo alternatives –config java
The last step was to activate the new installation I added. I selected option 2.
As simple as that and running java -version shows me the Oracle JVM version.