Installing OpenJDK 8 on Debian

OpenJDK Developers Guide

In this guide, I’m going to show you how to download and install OpenJDK 8 on Debian. - OpenJDK Community Version

What is OpenJDK

OpenJDK is the short form of Open Java Development Kit similar to Oracle's Java Development Kit used to develop Java Applications. Main difference between Oracle JDK and OpenJDK is that OpenJDK is free for all while Oracle Java Development Kit or Oracle JDK requires commercial license.

If you want to know more about OpenJDK, you can go through Open Java Development Kit Quick guide.

Step #1: Download

Go to and download the debian openjdk 8 tar distribution openjdk-8u41-b04-linux-x64-14_jan_2020.tar.gz. Here is the quick lik to download the debian openjdk 8 tar file openjdk-8u41-b04-linux-x64-14_jan_2020.tar.gz

Step #2: Install

To Install debian openjdk 8 Java Runtime - Enter the below command on Debian command line.

$ sudo apt-get install openjdk-8-jre

The openjdk-8-jre package contains just the Java Runtime Environment. If you want to develop Java programs then please install the openjdk-8-jdk package.
To Install debian OpenJDK 8 Java Development Kit (JDK) - Enter the below command on Debian command line.

$ sudo apt-get install openjdk-8-jdk

Step #3: Configure / SET JAVA_HOME Path

Once the above steps are successfully completed , we need to set the "JAVA_HOME" and "PATH" environment variables. Enter the following commands to set your environment variables. Make sure that your environment variables point to a valid installation of JDK on your Debianmachine.

export JAVA_HOME=/usr/lib/jvm/openjdk-8-jdk

Add the JAVA bin directory to the PATH variable

export PATH=$PATH:$JAVA_HOME/bin

This will append the java bin directory to the existing PATH variable. You can also check the PATH variable by entering the following command

Step #4: Verify

Once the debian OpenJDK 8 Download and installation is complete, we can verify the installed OpenJDK 8 version using below Command.

Go to Debian prompt and type java -version
The above command prints the OpenJDK 8 version you installed.

Java -version

Verify the installed OpenJDK 8 version on windows

Congratulations !!! Now you have installed OpenJDK 8 on debian Successfully.

Where to Download OpenJDK ?
- here are the OpenJDK versions you might be interested in!

OpenJDK 7
OpenJDK 8
OpenJDK 9
OpenJDK 10
OpenJDK 11
OpenJDK 12

If you are looking out for earlier OpenJDK versions, go to OpenJDK Archive

You Might Also Interested In Below Posts

  1. OpenJDK On Debian
  2. Debian install OpenJDK 7
  3. Debian install OpenJDK 8
  4. Debian install OpenJDK 9
  5. Debian install OpenJDK 10
  6. Debian install OpenJDK 11
  7. Debian install OpenJDK 12
  8. Debian install OpenJDK 13
  9. Debian install OpenJDK 14
  10. Debian install OpenJDK 15

  1. OpenJDK On Windows
  2. OpenJDK 7 Installation on Windows
  3. OpenJDK 8 Installation on Windows
  4. OpenJDK 9 Installation on Windows
  5. OpenJDK 10 Installation on Windows
  6. OpenJDK 11 Installation on Windows
  7. OpenJDK 12 Installation on Windows
  8. OpenJDK 13 Installation on Windows
  9. OpenJDK 14 Installation on Windows
  10. OpenJDK 15 Installation on Windows