Install Open JDK

For a list of installed versions you can use the following command:

update-java-alternatives -l

If you have many versions installed, you can select which one will be the default via the following command:

update-alternatives --config java

You can install version 8 specifically (recommended for Java Web applications) install via command:

sudo apt install openjdk-8-jdk

You may install any specific version with the following command (replace X with your version):

sudo apt install openjdk-X-jdk

To install the latest one use the command:

sudo apt install default-jdk

To learn more about current state of Java check these articles:

Leave a Reply