Latest Oracle (Sun) Java JDK and JRE 6 on Ubuntu operating systems

Java LogoLets be honest, coding on Linux will probably include some Java based application like Eclipse or NetBeans. That's actually not a bad thing because we get to carry our development environment with us when using other proprietary operating systems. But since Oracle sliced "Operating System Distributor License for Java" and now nobody can legally host Java repository we have to install Java manually by downloading their JRE or JDK blob from Oracle servers. That isn't exactly hard thing to do but we don't want to give Oracle the pleasure of knowing that they made our already crowded day a little more complicated. So here I'm presenting work of excellent Debian packaging work by Janusz Dziemidowicz and a fellow open source enthusiast Martin Wimpress from Flexion.Org. These guys made it possible for us to create Java JDK 6 and JRE 6 deb packages and create local Java repository our selves.

If BASH script described in this article fails this means that script developer has failed to update script for latest Oracle web site changes. You can create latest Sun Java JDK and JRE 6 packages manually using instructions from my later article.

All we need to do is to download and execute Martin Wimpress BASH script, and that script will use Janusz Dziemidowicz work to create local repository and Java JDK deb packages. Now make yourselves a coffee, open your terminal and paste these commands:

cd ~/
wget -O
chmod +x
sudo ./

Now after you get "All done!" from this BASH script you can use following command to install full Java JDK 6 from your local repository:

sudo apt-get install sun-java6-bin sun-java6-fonts sun-java6-javadb sun-java6-jdk sun-java6-jre sun-java6-plugin sun-java6-source

If Java JRE 6 is all you need (if you don't plan on creating Java based applications on your machine) then you can use following command:

sudo apt-get install sun-java6-jre sun-java6-plugin

To test you new Java installation just take a look at the output of following command:

java -version

Just a note, if your NetBeans spits out "Cannot find java. Please use the --jdkhome switch." then you can use one of my older articles to give it a little push:

That's it, big thanks to you Janusz and Martin for making our day little easier.


A quality focused Magento specialized web development agency. Get in touch!

8 thoughts on “Latest Oracle (Sun) Java JDK and JRE 6 on Ubuntu operating systems

  1. Juraj Lutter

    You are not checking for accept/decline license therefore .bin files in cache are very likely to only be a HTML errror page instad of actual java install packages.


Leave a Reply

Your email address will not be published. Required fields are marked *