Download & Install Sun Java Jdk in Ubuntu 11.04

I had to install Netbeans & JDK in some PCs with no internet connectivity. That’s why, I needed to know how to install Java JDK properly and configure it. Though I mentioned Ubuntu 11.04 version, it should work with any version of newer Ubuntu.

Download Sun  JDK

Download the .bin file from official site.

Create Installation + Configuration Scripts

  1. Copy this code to a file name and put it in the directory where you put the downloaded jdk. When I prepared this script, jdk version was 1.6.0_25, if you install an upgraded version edit line #4 accordingly in this script.
  2. Now Copy code from this link & save it in a file name, put it in the same directory where you downloaded jdk.

[Note: I copied the original script from the link provided at the end of this article]

Install “java-common”

I’ll find an offline installer of this package and add later. Till then, you can install it by :

sudo apt-get install java-common

Ready to Install!

Right click all the three files (the JDK, & and select properties. In the Permissions tab, put check mark on “allow executing file as program”

Then open a terminal, go to this directory where all these files exist (to avoid trouble you can put all these files in your home directory) and type:


That’ll do 🙂



7 thoughts on “Download & Install Sun Java Jdk in Ubuntu 11.04

  1. Or you can enable the partner repo and download the package sun-java-jdk (I think that’s what it’s called…). I just did it then

      1. No, you didn’t. Just download the .deb and install it. My script was to install JDK 5.

Comments are closed.