How to Install Oracle Java 13 on Ubuntu 20.04/18.04/19.04/16.04 & Debian 10/9/8?. Java is a popular programming language created in 1995 and used for developing mobile, web and Desktop Applications among many others. JDK 13 is an open-source reference implementation of version 13 of the Java SE Platform as specified by by JSR 388 in the Java Community Process. It is available for general use in Production environments.

For CentOS / Fedora, refer to: How To Install Oracle Java 13 (OpenJDK 13) on CentOS 7/8 & Fedora 31/30/29

The Java Platform lets you develop and deploy Java applications on servers, desktops and IoT devices. This short guide will cover the steps required to Install Oracle Java 13 on Ubuntu 20.04/18.04/16.04 & Debian 10/9. To be specific, the OpenJDK 13 or Java SE Development Kit 13.

Option 1: Install OpenJDK 13 on Ubuntu 20.04/18.04/16.04 & Debian 10/9

Visit JDK 13 releases page to download the latest archive.

sudo apt install -y curl
curl -O

Extract downloaded file using tar command.

tar xvf openjdk-13_linux-x64_bin.tar.gz

Move the resulting folder to /opt directory.

sudo mv jdk-13 /opt/

Configure Java environment:

sudo tee /etc/profile.d/ <<EOF
export JAVA_HOME=/opt/jdk-13
export PATH=\$PATH:\$JAVA_HOME/bin

Source your profile file and check java command

source /etc/profile.d/

Confirm Java version.

$ echo $JAVA_HOME

$ java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)

Option 2: Install Java SE Development Kit 13 on Ubuntu 20.04/18.04/16.04 & Debian 10/9

Java SE Development Kit comprises of a set of tools required by Developers to write, compile, run and debug Java Applications.

Update your list of packages and install wget.

sudo apt update
sudo apt -y install wget

Download Java SE Development Kit 13.

 wget --no-check-certificate -c --header  "Cookie: oraclelicense=accept-securebackup-cookie" ""

If curl doesn’t work for you, download the package manually from Oracle Downloads page. Then install it using dpkg command.

sudo dpkg -i jdk-13_linux-x64_bin.deb

For any dependency errors, resolve with the command:

sudo apt -f install

Configure Java environment.

cat <<EOF | sudo tee /etc/profile.d/
export JAVA_HOME=/usr/lib/jvm/jdk-13
export PATH=\$PATH:\$JAVA_HOME/bin

To check if you have Java installed on your machine, type the following command:

$ source /etc/profile.d/
$ java -version
java version "13-ea" 2019-09-17
Java(TM) SE Runtime Environment (build 13-ea+33)
Java HotSpot(TM) 64-Bit Server VM (build 13-ea+33, mixed mode, sharing)

Test Java Installation

Create a HelloWorld Java program.

$ cat 
public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");


Compile Java code.

$ javac

Run your Java program.

$ java HelloWorld
Hello, World

Java Learning courses:

Recommended Books:

Best Books for Learning Java Programming

More how to guides:

How to set default Java version on Ubuntu / Debian

Set JAVA_HOME on CentOS / RHEL / Fedora

How to Install Apache Hadoop / HBase on Ubuntu 18.04

How to Install Java 8 on Ubuntu 18.04/16.04

How to Install Apache Hadoop / HBase on CentOS 7

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here