Help‎ > ‎Linux‎ > ‎

Java JDK Install Ubuntu 12.04

Installing Java on Linux can be a nightmare. For this tutorial we will install the JDK on Ubuntu Linux 12.04.  Notice that we will not be using the JRE.  You can use the JRE if you would like, but the JDK includes everything the JRE includes.

First Download the JDK in the RPM format on the Oracle Java Website:


Yes, we do want it in the RPM format... Its the easiest to work with.

Install Alien

sudo apt-get install alien

Use Alien to convert the Java JDK RPM to a DEB install file

sudo alien -c jdk-7u11-linux-x64.rpm

Use DPKG to install the newly created RPM

sudo dpkg --install jdk-7u11-linux-x64.deb

Create a folder to store plugins for Firefox

mkdir ~/.mozilla/plugins/

Locate the Firefox plugin

$ sudo find /* | grep libnpjp2.so
/usr/java/jdk1.7.0_11/jre/lib/amd64/libnpjp2.so

Use that location to create a sym link in the ~/.mozilla/plugins/ directory

ln -s /usr/java/jdk1.7.0_11/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so

Restart your browser, and viola!