Table of Contents

download and install the JRE for Linux.

  1. Download
  2. Install
  3. Enable and Configure
  4. Test Installation

Download

  1. Click on Get Java Software button
  2. here are two types of installation packages. Linux RPM package or Linux self extracting binary file. Download the package that best suits your needs.
Linux RPM (Redhat Package Manager) uses RPM to install the JRE. In order to use this method, you need to have RPM available on your system. Otherwise use the other option.

Linux Download Options

  1. Click the appropriate Download button to download the package that best suits your needs. You can download the file to any of the directories on your system.
  2. After download verify (For Linux self extracting binary file):
    • Name of the file is jre-1_5_0_02-linux-i586.bin
    • Size is approximately 15.8 MB

Install

Linux self extracting binary file

The instructions below are for installing JRE 5.0. If you're installing another version, make sure you change the version number appropriately when you type the commands at the terminal.

To install the Linux (self-extracting) file, follow these instructions:

  1. At the terminal:
    su
  2. Enter the root password.
  3. Change to the directory in which you want to install.
    cd <directory path name>
    • For example, to install the software in the /usr/java/ directory:
      cd /usr/java/
    • Note about root access: To install the JRE in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the JRE in your home directory or a subdirectory for which you have write permissions.
      1. Change the permission of the file you downloaded to be executable.
        chmod a+x jre-1_5_0-linux-i586.bin
      2. Verify that you have permission to execute the file.
        ls -l
      3. Make sure the installation file has executable permission
  4. Start the installation process.
    ./jre-1_5_0-linux-i586.bin
    • This displays a binary license agreement. Read through the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
  5. type YES to agree to the license agreement
    • The JRE is installed into its own directory. In this example, it is installed in the /usr/java/jre1.5.0 directory. When the installation has completed, you will see the word Done.
  6. The installation completes
    • The JRE is installed in jre1.5.(version number) sub-directory under the current directory. In this case, the JRE is installed in the /usr/java/jre1.5.0 directory. Verify that the jre1.5.0 sub-directory is listed under the current directory.
      ls
  7. Verify the installation filename
  8. The installation is now complete. Go to the Enable and Configure section.

Enable and Configure

# Mozilla 1.4 and later # Mozilla 1.2, Netscape 6 and later

Mozilla 1.4 and later

  1. Go to the plugins sub-directory under the Mozilla installation directory
    cd <Mozilla installation directory>/plugins
  2. In the current directory, create a symbolic link to the JRE ns7/libjavaplugin_oji.so file.
    ln -s <JRE installation directory>/plugin/i386/ns7/libjavaplugin_oji.so
    • Example:
      • If Mozilla is installed in this directory:
        /usr/lib/mozilla-1.4/
      • and if the JRE is installed at this directory:
        /usr/java/jre1.5.0
      • Then type at the terminal to go to the browser plug-in directory:
        cd /usr/lib/mozilla-1.4/plugins
      • Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
        ln -s /usr/java/jre1.5.0/plugin/i386/ns7/libjavaplugin_oji.so.
      • Warning: If you use the plugin that is in ns7-gcc29 instead of the path ns7, Iceweasel/Mozilla will be killed when trying to use the jre plugin.
  3. Start Mozilla browser or restart it if it is already running. Note that if you have other Mozilla components (ie: Messenger, Composer, etc) running, you will need to restart them as well.
  4. Go to Edit > Preferences. Under Advanced category > Select Enable Java

Using ASDF

First, install asdf as well as its java plugin:

$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0

Then, depending of your shell, chose the right instructions (<your shell> + git) from the official doc.

Once you have installed asdf, add its Java plugin:

$ asdf plugin-add java https://github.com/halcyon/asdf-java.git

Finally, pick a version of openjdk and install it:

$ asdf list all java
...

openjdk-9
openjdk-9.0.1
openjdk-9.0.4
openjdk-10
openjdk-10.0.1
openjdk-10.0.2
openjdk-11
openjdk-11.0.1
openjdk-11.0.2
openjdk-12
openjdk-12.0.1
openjdk-12.0.2
openjdk-13
openjdk-13.0.1
openjdk-13.0.2
openjdk-14
openjdk-14.0.1
openjdk-14.0.2
openjdk-15
openjdk-15.0.1
openjdk-15.0.2
openjdk-16
openjdk-16.0.1
openjdk-16.0.2
openjdk-17
openjdk-17.0.1
openjdk-17.0.2
openjdk-18
openjdk-18.0.1
openjdk-18.0.1.1
openjdk-18.0.2
openjdk-18.0.2.1
openjdk-19
openjdk-19.0.1
openjdk-19.0.2
openjdk-20
openjdk-20.0.1
openjdk-20.0.2
openjdk-21
openjdk-21.0.1
openjdk-21.0.2
openjdk-22
openjdk-22.0.1
openjdk-22.0.2
...
$ asdf install java openjdk-17
$ asdf global java openjdk-17