Install Java Package in Ubuntu Offline

To install Sun Java using pre-packaged debs in vanilla installation of Ubuntu 8.04 without an Internet connection you will be required to satisfy a few dependencies.

To view the list of dependencies and recommended packages you can use Ubuntu Packages Search and search for a top level package, in this case it is sun-java6-plugin.

http://packages.ubuntu.com/

Download the following six .deb files to successfully complete the installation offline:

  1. sun-java6-jre_6-06-0ubuntu1_all.deb
  2. sun-java6-bin_6-06-0ubuntu1_i386.deb
  3. sun-java6-plugin_6-06-0ubuntu1_i386.deb
  4. java-common_0.30_all.deb
  5. unixodbc_2.2.11-16build1_i386.deb
  6. odbcinst1debian1_2.2.11-16build1_i386.deb

You can locate these either through Ubuntu Packages Search or download them directly through Ubuntu Archive:

If you try to install Sun JRE by double clicking on the package you will notice that it is dependent on Sun BIN, which in turn depends on Sun JRE creating an infinite loop. To combat this create a folder (i.e. “java”) on your Desktop and copy all six files to it.

Now launch the terminal and navigate to the the folder you created.

Launching terminal in Ubuntu

To combat the cycle dependency we will use a Debian package management system tool. From within the java folder run the following command:

sudo dpkg -i *

dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages. Read more…

Installing Java packages with dpkg

When prompted, read and accept the Operating System Distributor License for Java (DLJ).

Operating System Distributor License for Java

Accepting Operating System Distributor License for Java

Dpkg will install all the debs in correct order and will return focus to the command line when finished.

dpkg -i * command output

To verify your Java installation try running the following command:

java -version

java -version command output

If you have or will have an Internet connection at some point try visiting the following website to verify that Firefox correctly interprets Java applets:

http://www.java.com/en/download/help/testvm.xml

Applet support in Firefox

That’s it. It is that easy. If you have any problems, questions or comments feel free to post them below.

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • StumbleUpon
  • del.icio.us
  • Mixx
  • Reddit
  • Facebook
  • Google
  • Live
  • Technorati
  • Furl
  • TwitThis
  • Pownce
  • E-mail this story to a friend!
  • Print this article!

2 Responses to “Install Java Package in Ubuntu Offline”

  1. aMeR1CaN_aUsSiE said:

    Jun 26, 08 at 18:02

    Thank you Ilya. Very helpful. I a have used it multiple times now.

  2. Roy Radford said:

    Jul 20, 08 at 16:32

    Hi, Ilya,

    Thanks for this instruction sheet. I’ve been trying for several months, on and off, to install Java offline. Success at last, thanks to you!

    Have fun,

    Roy.


Leave a Reply