Java Runtime Environment (1.5)


These instructions are for i386 and amd64 computers only. For PowerPC machines, see Ubuntu Help Online.


At the time of this writing J2SE is at version 5.0 Update 6. This is subject to change. If you do not see this version on Sun's website, download the newest version displayed.

  1. Go to and click on “Download JRE 5.0 Update 6”. Do not choose the link with the NetBeans bundle.

  2. You must first accept the licence, then click on “Linux self-extracting file” and Download jre-1_5_0_06-linux-i586.bin to your hard drive.


    If you use an amd64 computer, please replace jre-1_5_0_06-linux-i586.bin with jre-1_5_0_06-linux-amd64.bin.

  3. Install the java-package package from the “Multiverse” repository (see Chapter 3, Adding, Removing and Updating Applications).

  4. Make the downloaded file executable. At the command line, change to the directory where you downloaded the file, and type

    chmod +x jre-1_5_0_06-linux-i586.bin

  5. To install JRE, first build an Ubuntu package. Type

    fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin

  6. Then install the package you have built:

    sudo dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb

  7. To get your system to use Sun Java instead of the open-source (but less functional) GIJ that is installed by default, run:

    sudo update-alternatives --config java

    and choose the option that has j2re1.5-sun in it.