Install Java 11 on Raspberry Pi

Install Java 11 on Raspberry Pi

Java is a programming language that is used in various applications and systems. OpenJDK and Oracle JDK are two implementations of the Java based on same specification. The main difference between these Java implementations is licensing. OpenJDK is an open-source implementation of the Java. Oracle JDK requires a commercial license.

The Java Runtime Environment (JRE) is a package that includes Java Virtual Machine (JVM) and allows to run Java applications. The Java Development Kit (JDK) is full-featured package that consist of JRE, debugging and development tools that allows to build and run Java applications.

Java 11 is a long-term support (LTS) release. This tutorial shows how to install Java JDK 11 (OpenJDK) on Raspberry Pi.

Connect to Raspberry Pi via SSH and execute the following commands to install Java 11:

sudo apt update
sudo apt install -y openjdk-11-jdk

After installation we can check Java version.

java -version

If we want completely remove any package with a name that starts with java and anything related to it we can execute this command:

sudo apt purge -y java.*

Leave a Comment

Cancel reply

Your email address will not be published.