Install Oracle JDK in Fedora 18

1. Download JDK from oracle

2. Install it as root:

[root@fc18]# rpm -i jdk-7u17-linux-x64.rpm

3. Define the alternatives

[root@fc18]# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_17/bin/java 2
[root@fc18]# alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_17/bin/javac 2
[root@fc18]# alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_17/bin/jar 2
[root@fc18]# alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_17/bin/javaws 2

4. Configure the alternatives for java

[root@fc18]# alternatives --config java

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/jdk1.7.0_17/bin/java
Enter to keep the current selection[+], or type selection number:

Enter 2, the jdk from oracle.

5. Repeat for all the alternatives:

[root@fc18]# alternatives --config javac
[root@fc18]# alternatives --config jar
[root@fc18]# alternatives --config javaws

Java plugin for Chrome:

1. Create the directory /opt/google/chrome/plugins

[root@fc18]# mkdir /opt/google/chrome/plugins

2. In /opt/google/chrome/plugins create the following soft links:

[root@fc18]# ln -s /usr/java/jdk1.7.0_17/jre/lib/amd64/ 
[root@fc18]# ln -s /usr/java/jdk1.7.0_17/jre/lib/amd64/

3. Check the plugin appears in your chrome by entering the following url: chrome://plugins/

4. Test if your plugin is working by clicking on:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s