Manual Linux Java Install

To manually install OpenJDK 8, follow these steps:

  1. Navigate to the AdoptOpenJDK download page

  2. Select OpenJDK 8 (LTS) as the version to download.

    ../../_images/openjdk8.png
  3. Select Linux as your Operating System.

    ../../_images/openjdklinux.png
  4. Select the corresponding architecture for your system in the Architecture field.

    ../../_images/openjdkarchitecturelinux.png
  5. Click on the available JRE archive file download link for the above selected options, to download the OpenJDK prebuilt binary.

    ../../_images/openjdkdownloadlinklinux.png
  6. In your system, create a folder called java and cd into it.

  7. Expand the downloaded file using the following command (adapt the filename according to the name of your downloaded file):

    $ tar -xf OpenJDK8U-jre_x64_linux_hotspot_8u242b08.tar.gz
    
  8. Add Java to your PATH:

    $ export PATH=$PWD/jdk8u242-b08-jre/bin:$PATH
    
  9. To ensure that Java is now correctly installed, open a console and type java -version. The output should look something like this:

    $ java -version
    openjdk version "1.8.0_242"
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)