Ubuntu 12.04 (Precise Pangolin) is right around the corner and requests have been pouring in from our loyal readers. One of those requests is how to install Oracle Java Runtime Environment (JRE) 7 in Ubuntu 12.04. I have written about this topic on this blog previously, but not for Precise Pangolin. This brief tutorial is going to show you how to install it in Ubuntu 12.04 Precise Pangolin if you haven’t already done so.
Objectives:
- Install Oracle Java / JRE in Ubuntu 12.04 (Precise Pangolin)
- Enjoy!
To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to remove all other installations of OpenJDK from your system.
sudo apt-get purge openjdk*
Enhance your coding experience with this split keyboard that offers up to 9" of separation.
After that, go and download Java JRE package from here. When prompted, save the download. Please select the 32 or 64 bit .tar.gz version file from the list.
After saving the file, go back to your terminal and run the below commands to extract the java packages you downloaded.
tar -xvf ~/Downloads/jre-7u3-linux-i586.tar.gz
Next, create your java 7 folder by running the commands below.
sudo mkdir -p /usr/lib/jvm/jre1.7.0
Then move all the extracted files and folders into the java 7 folder.
sudo mv jre1.7.0_03/* /usr/lib/jvm/jre1.7.0/
Next, run the commands below to install / update java 7
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0
Next, create a plugin folder in your home directory by running the commands below.
mkdir ~/.mozilla/plugins
Finally, link the java plugin to your profile.
ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so ~/.mozilla/plugins/
That’s it! Enjoy!
If your system profile is AMD64, then link java to your profile by running the commands below.
ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.
Muito bom o tutorial, parabéns!
Very helpful stepwise tutorial. Thank you.
Thank you. Liberiangeek helps me again. This tutorial was helpful. Please keep the simplicity of your tutorial.
Keep emphasizing your screenshots so we can understand stuffs quickly :)
Ubuntu 12.10… still works like a charm
Thank you Sir.
it was really really helpful. Please help us in understanding other important aspects too in the same way.
Must restart browser after java install and before running verify java version.
And where to place jdk?
Really good.
But, we don’t need: sudo apt-get purge openjdk*
A few programs will removed together.
I accidently installed “javaJRE 32” not 64 (my system is 64)….. and it seems not to be working. does anyone know how I can fix this?
Or just undo all this so i can try it again?
I know it’s an old comment. But if you find yourself in the same situation, run the first command provided by the author.
Run this without quotes:
“sudo rm -R /usr/lib/jvm/jre1.x.x”
Thanks a lot for this wonderful tutorial, may God bless you with more knowledge and wisdom :)
Thanks man !
Thanks.
Really helpful!!
Thanks a lot. You saved me a lot of trouble with my paranoid internet banking service.
Thanks for the tutorial. However, in addition to FF, I use Chrome and Chromium. Do you have any suggestions for installing the plugin for the Chrom* browsers?
Woohoo! This totally worked for me and helped me out greatly! Thank you… a lot!
Thank you for such a great tutorial! I could finally setup Java on my machine.
Any suggestions for installing Java plugin in Chrome?
Run this without quotes:
“sudo rm -R /usr/lib/jvm/jre1.x.x”
Looked at many websites but found this part
sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0
only on your blog.
Thank you!
thank you very much, I searched far and only your tutorial worked.
I have followed all the instructions (link the java plugin to your profile), but still not working, help please bro…
Thank You Very Much for explaining the installation steps with screenshot.
Hey, great tutorial…
Just one additional point, you also need to grant execution priveleges to the java binary :
chmod u+x /usr/lib/jvm/jre1.7.0/bin/java
Had to do that before i was able to install the android sdk.
OR you could just use “the default the version of Java that is provided from a supported Ubuntu repository”. Just open your Ubuntu Software Center and look for one of the files mentioned here: https://help.ubuntu.com/community/Java
Installs automatically.
Excellent! It works even for the newest version 8, just change 1.7* for 1.8 wherever it appears. I tried other methods but didn’t work,
if I type java -version I am getting the following error java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
Can anyone help
?