Installing OpenJDK on Pop!_OS

Pop!_OS is a Debian-based Linux distribution that is designed for developers and makers. It comes with the latest version of the GNOME desktop environment, and is optimized for use on laptops and desktops. In this article, we will show you how to install OpenJDK 8 and OpenJDK 11 on Pop!_OS.

OpenJDK
OpenJDK

OpenJDK 8

OpenJDK 8 is the latest long-term support (LTS) version of the Java Development Kit (JDK). It is still widely used and supported by many organizations, and is the recommended version for most production systems. To install OpenJDK 8 on Pop!_OS, open a terminal and enter the following commands:

sudo apt update
sudo apt install openjdk-8-jdk

This will install the OpenJDK 8 JDK and all of the necessary libraries and tools. Once the installation is complete, you can verify that it is working by running the following command:

java -version

You should see output similar to the following:

openjdk version “1.8.0_275”
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)

OpenJDK 11

OpenJDK 11 is the latest version of the JDK, and is the recommended version for new projects. To install OpenJDK 11 on Pop!_OS, open a terminal and enter the following commands:

sudo apt update
sudo apt install openjdk-11-jdk

Once the installation is complete, you can verify that it is working by running the following command:

java -version

You should see output similar to the following:

openjdk version “11.0.11” 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode, sharing)

Note: The version numbers in the output may be different depending on the version of OpenJDK you have installed.

Attribution

Installation instructions for OpenJDK 8 and OpenJDK 11 on Pop!_OS are based on the official documentation from OpenJDK (https://openjdk.java.net/)
Pop!_OS is developed by System76 (https://system76.com/)

That’s it! You now have both OpenJDK 8 and OpenJDK 11 installed on your Pop!_OS system, and can switch between them as needed. If you have any questions or issues, please refer to the official documentation or seek help from the Pop!_OS community.