Install Oracle Java 14 (OpenJDK 14) on Ubuntu 20.04 / 18.04 and Debian 10/9

Ranch
You can support us by downloading this article in PDF format via the link below.

Download the guide as a PDF

turn off
Ranch

Ranch
Ranch

Welcome to our guide on how to install Oracle Java 14 / OpenJDK 14 on Ubuntu 20.04 / 18.04 / 16.04 and Debian 10/9 / Linux systems. Java is a popular programming language for developing web, mobile, and desktop applications. The Java platform enables you to develop and deploy Java applications on servers, desktops, and IoT devices

JDK 14 is an open source reference implementation of the Java SE platform version 14. JSR 388 In the Java community process. You can read JDK 14 release notes Learn about new and interesting features.

So let’s see how to install Oracle Java 14 (OpenJDK 14) on Ubuntu 20.04 / 18.04 and Debian 10/9 Linux systems.

Option 1: Install Oracle Java 14 on Ubuntu from the PPA repository

The Linux Uprising Team provided a PPA database Comes with pre-built Java binary packages. You can add a repository using the following command.

sudo apt update
sudo add-apt-repository ppa:linuxuprising/java

If you do not have the add-apt-repository command, check out the article on how to add add-apt-repository to Ubuntu / Debian systems.

After adding the repository, proceed to install Oracle Java 14 on Ubuntu Linux.

sudo apt -y install oracle-java14-installer

To set Oracle JDK 14 as the default, install the “oracle-java14-set-default” package.

sudo apt -y install oracle-java14-set-default

Confirm your Java version.

$ java -version
java version "14" 2020-03-17
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Then

Set up the Java environment.

sudo nano /etc/profile.d/jdk.sh

plus:

export JAVA_HOME=/usr/lib/jvm/java-14-oracle
export PATH=$PATH:$JAVA_HOME/bin

Update your environment:

source /etc/profile.d/jdk.sh

Option 2: Install Oracle Java SE Development Kit 14 on Ubuntu / Debian Linux

If you choose to Java SE Development Kit 14To download the DEB package for Debian / Ubuntu Linux.

Update the package list and install wget.

sudo apt update
sudo apt -y install wget curl

Download the Java SE Development Kit 14 package.

wget --no-check-certificate -c --header  "Cookie: oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/14+36/076bab302c7b4508975440c56f6cc26a/jdk-14_linux-x64_bin.deb"

Then use Easy command:

sudo apt install ./jdk-14_linux-x64_bin.deb

When prompted, agree to install.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'jdk-14' instead of './jdk-14_linux-x64_bin.deb'
The following additional packages will be installed:
  libasound2 libasound2-data
Suggested packages:
  libasound2-plugins alsa-utils
The following NEW packages will be installed:
  jdk-14 libasound2 libasound2-data
0 upgraded, 3 newly installed, 0 to remove and 53 not upgraded.
Need to get 421 kB/166 MB of archives.
After this operation, 1,824 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

Configure the Java environment.

cat <

To check if Java is installed on your computer, type the following command:

$ source /etc/profile.d/jdk14.sh
$ java -version
java version "14" 2020-03-17
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

Option 3: Install OpenJDK 14 on Ubuntu 20.04 / 18.04 and Debian 10/9

Visit JDK 14 release page Download the latest file.

curl -O https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz

Use the tar command to decompress the downloaded OpenJDK 14 archive.

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

Move the results folder to the / opt directory.

sudo mv jdk-14 /opt/

Configure the Java environment:

sudo tee /etc/profile.d/jdk14.sh <

Get your profile and check java command

source /etc/profile.d/jdk14.sh

Confirm the Java version.

$ echo $JAVA_HOME
/opt/jdk-14

$ java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

honor! You have successfully installed Oracle Java 14 on Debian 10/9 and Ubuntu 20.04 / 18.04 / 16.04 Linux computers.

For CentOS / Fedora, please refer to using:

Install Oracle Java 14 (OpenJDK 14) on CentOS and Fedora

Ranch
You can support us by downloading this article in PDF format via the link below.

Download the guide as a PDF

turn off
Ranch

Ranch
Ranch

Sidebar