Disclaimer: TubeMint is fully funded by its readers, we recommend hightly rated affiliate products and services and when you buy them through our links, we get commission at no extra cost to you. Thanks for you support!
open jdk 14

How to Install Java Open-JDK & JRE 14 on Ubuntu 19.10

In this post, I am going to walk you through the installation process of Open JDK 14 and Open JRE 14 on Ubuntu 19.10 desktop version.

Go ahead and launch your Ubuntu terminal and shoot the following the commands.

Update Ubuntu 19.10 First

sudo apt update && upgrade

Install JRE 14 on Uubuntu

sudo apt install openjdk-14-jre-headless -y

Install JDK 14 on Ubuntu

sudo apt install openjdk-14-jdk-headless -y

Verify JDK & JRE 14

After installing the Open JDK and JRE 14-ea; here ea means early access. We must verify them by running the following command with terminal

install jre jdk 14

Check JRE

java -version

Check JDK

javac -version

Quick Code Test w/ JDK & JRE 14 ea

Go and ahead and fire up your favorite text editor. I am going to use Nano. And write a ‘hello world’ program. Compile and run it.

Java Hello World code in Main.java file

public class Main{ 
        public static void main(String[] args){ 
                System.out.println("Hello World from Open JDK 14");
        }
}

Compile with JDK 14

javac Main.java

Run with JRE 14

java Main
compile and run with jdk 14
Techbuyer

Leave a Reply