Install Oracle Java Runtime (JRE) 7 in Ubuntu 12.04

I faced some problem to install Oracle Java Runtime installing on ubuntu 12.04 . here is a solution I found and it’s worked for me.

Here is step by step instruction  of install Java Runtime .

Open Terminal. Then,  run the commands below to remove all other installations of OpenJDK from your system.

sudo apt-get purge openjdk*

Then, go and download Java JRE package from here.

Run the below commands to extract the java packages you downloaded.

tar -xvf ~/Downloads/jre-7u3-linux-i586.tar.gz

Now create your java 7 folder by running the commands below.

sudo mkdir -p /usr/lib/jvm/jre1.7.0

Now run this command for move all the extracted files and folders into the java 7 folder.

sudo mv jre1.7.0_03/* /usr/lib/jvm/jre1.7.0/

This commands will install / update java 7

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0

That’s it.


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