
Start by finding the location of your default Java instance: sudo update-alternatives -config java If not configured, you may receive a “ no JDK found” error.ġ.

Note: Applications compiled in Java (e.g., Apache Tomcat) use the JAVA_HOME path environment variable to access your Java’s installation path. In a terminal window, enter the following: sudo apt update The default Raspbian repositories have a fully-updated and compatible version of OpenJDK.ġ.

Raspberry Pi’s system architecture is ARM-based so many packages aren’t compatible. It is recommended that you install all packages from the default Raspbian software repositories. Raspbian is based on Debian, so terminal commands to install Java will use the aptpackage manager.

Oracle Java versions require an account to download, and most are not compatible with Raspberry Pi. Important: This guide will help you install the free, open-source OpenJDK version.
