


OpenJDK Runtime Environment (build 13.0.4+8-Ubuntu-120.04) The response will look like: openjdk version "13.0.4" Install Java 13 JDK: $ sudo apt install openjdk-13-jdkĬheck current JRE version: $ java -version If you check current JDK and JRE versions it will still display Java 11. Install Java 8 JDK: $ sudo apt install openjdk-8-jdk The response will look like: javac 11.0.9 2. OpenJDK 64-Bit Server VM (build 11.0.9+11-Ubuntu-0ubuntu1.20.04, mixed mode, sharing) OpenJDK Runtime Environment (build 11.0.9+11-Ubuntu-0ubuntu1.20.04)

The response will look like: openjdk version "11.0.9" Install Java 11 JDK: $ sudo apt install default-jdk Installing a JDK package will also install the corresponding JRE. It is the default Java development and runtime version. Install Java 11 JRE/JDKĪt the time of writing, Java 11 is the latest long-term supported (LTS) version of Java. Sudo apt install openjdk-8-jdk-headless # version 8u265-b01-0ubuntu2~20.04Īs you can see, the terminal response displays the commands to install various headless JDK versions. Sudo apt install default-jdk # version 2:1.11-72, or If you do not have a Java JDK installed the terminal response will look like: Command 'javac' not found, but can be installed with: Open a terminal and check java JDK version: $ javac -version When the java application does not use a graphical user interface the headless version can be used. for JDK 11 choose from openjdk-11-jdk-headless and openjdk-11.

In this article, we are going to run through the installation and management of JREs/JDKs. You may need to work with various versions of Java Runtime Environents (JRE) and Java Development Kits (JDK).
