Installing Java on Linux

To install Java on your Linux machine, perform the folowing steps:

  1. Go to the Java download page (it will open in a new window).

  2. Find the "download" link on that page, as shown below in Fig. 1. Note that since Sun is continuously developing the Java language, so the specific JSE version number may be higher than the one in the image -- this is fine.

    Fig. 1

  3. After clicking the "Download" link you will come to a license agreement. You will need to accept it to continue (see Fig. 2).

    Fig. 2
  4. Download the "RPM self-extracting file", as shown below in Fig. 3. The file name may be slightly different.

    Fig. 3
  5. Save the file to your computer, and note the location to which you are saving it. After the download is complete, change into the directory you saved it to, and make sure the file is executable. Launch the file:

     $ cd ~/Distribs
    $ pwd
    .../Distribs
    $ ls -l
    total 13288
    -rw------- 1 username username 13582366 Jan 9 14:35 j2re-1_4_2_03-linux-i586-rpm.bin
    $ chmod 700 j2re-1_4_2_03-linux-i586-rpm.bin
    $ ./j2re-1_4_2_03-linux-i586-rpm.bin
  6. The program will print out the license agreement, to which you must agree by typing "yes" at the prompt. As a result, a file will be created in the current directory with the same name and an rpm extension.

  7. As superuser (root), issue the following command:

    $ rpm -i j2re-1_4_2_03-linux-i586.rpm

    If during the install process the program prints error messages, they need to be analyzed -- you may be missing some libraries, which will need to be installed prior to Java.

  8. If you are using Netscape, Mozilla, or the SuSE 8.1 or higher version of Mozilla, you will need to follow Sun's instructions to register the java plug-in with the browsers.

  9. Your browser should now be able to launch java applets such as the Vista browser. Depending on your browser, you may need to start it again.