Install Oracle Java SDK on Fedora 18

Download the RPM for the 64 bit version from

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/ /usr/java/latest/jre/lib/amd64/ 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’.

Selection    Command
*+ 1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2           /usr/java/latest/jre/bin/java

Enter to keep the current selection[+], or type selection number: 2

# alternatives --config <enter>