How do I install Java 14 on Debian? The first Oracle Java 14 stable version was released on Mar 2020, and available to download and install. JAVA 14 is released with many new features and security updates. This tutorial will help you to install Java 14 on Debian 10/9/8 systems using PPA and apt-get command.
The Ubuntu and Linux Mint users use the below link to install Java on their system.
Step 1 – Add PPA to System
The webupd8 team has built a Java installer package for Debian systems. You need to add that PPA repository to your system for installing Java 14 on Debian.
Create a new Apt configuration file /etc/apt/sources.list.d/java-14-debian.list, and edit in text editor.
sudo vim /etc/apt/sources.list.d/java-14-debian.list
and add following content in it.
deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main deb-src http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main
Now import GPG key on your system for validating packages before installing them.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EA8CACC073C3DB2A
Step 2 – Install JAVA 14 on Debian
You are all set to start Java installation on Debian. Run the following commands to update apt-cache and then install Java 14 on the Debian system using the apt-get package manager.
sudo apt update sudo apt install oracle-java1 4-installer
The installer will prompt for accept Oracle terms in order to continue Java installation on Debian. Accept the terms and complete setup.
Step 3 – Verify Java Installation
Finally, you have successfully installed Oracle Java on your Debian system. Let’s use the following command to verify the installed version of Java on your system.
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)
Step 4 – Setup Java Environment
The Webupd8 PPA repository also provides a package to set environment variables, Install this package using the following command.
sudo apt installoracle-java14-set-default