Raspberry Pi

How to Install Java-17 on Raspberry Pi

Java is a programming language that is used in several systems and applications. The OpenJDK is an open-source implementation of Java that you can easily install on your system without requiring any license key. The presence of Java in a system allows you to run applications like Minecraft, Wire shark and so on, as these will run if you have Java installed on your system.

Having the latest version of Java on your Raspberry Pi system is extremely useful because it improves your application performance and fixes the bugs that occurred in the previous releases. Java -17 is the latest LTS release of Java developers, released on September 14, 2021.

In this article, we will show the process of installing Java-17 on Raspberry Pi so that you can improve your system performance.

How to Install Java-17 on Raspberry Pi

Since the Raspberry Pi system includes the Java repository in the official Raspberry Pi source list, installing Java-17 on the system won’t be a difficult task now. However, to begin the installation, you will first need to update the Raspberry Pi source list so that it can install the latest version of packages on your system. To install the latest packages update, run the following command-line:

$ sudo apt update && sudo apt upgrade -y

Using “-y” in the above command confirms installing the latest package update on your system.

After successfully updating the currently installed packages, you can run the following command to install Java-17 on your Raspberry Pi system.

$ sudo apt install openjdk-17-jdk -y

The Java-17 installation setup has a size of around 450+MB, which may take some time depending on your internet speed.

Once the installation completes, you can apply the following command to ensure Java-17 is installed on your system.

$ java --version

The output confirms that you have successfully installed Java-17 on your Raspberry Pi system.

Conclusion

Installing the latest Java-17 package on your system is extremely helpful as it can help improve your application performance by fixing the bugs in the previous releases. You can install Java-17 on your Raspberry Pi system directly from the source repository list, which requires only the apt installation command to install the package successfully on your system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.