/
Java 8 - Linux

Java 8 - Linux

This section helps you to install Java 8 on your computer. Before start installing, ensure that you have downloaded the installer. Click here to download Java 8 installer.

Download the tar file.

Extract the tar file to the /opt folder.

Configuring Java Environment Variable

  1. Note the extracted Java path, that is, ./opt/jdk 1.8.0_121.
  2. Modify the /etc/environment file to set Java variables. For example, 

    vi /etc/environment
  3. Type the below lines:
    JAVA_HOME="/opt/jdk1.8.0_121"
    JRE_HOME="/opt/jdk1.8.0_121/jre"
  4. Save the file and restart your computer.

Verifying Java Environment Variable

  1. Open the Terminal with root user.
  2. Execute the below commands to verify Java home and JRE home:
    echo $JAVA_HOME
    echo $JRE_HOME
    Command will show the installed Java version number. Check the version displayed on the Terminal with the version installed. 

Next Step

Installing Apache Tomcat 9

Related content

Java 8
More like this
6.9.12 Upgrading the JRE manually
6.9.12 Upgrading the JRE manually
More like this
6.9.13 Upgrading the JRE manually
6.9.13 Upgrading the JRE manually
More like this
Upgrading the JRE manually
Upgrading the JRE manually
More like this
Upgrading the JRE manually
Upgrading the JRE manually
More like this
Upgrading the JRE manually
Upgrading the JRE manually
More like this