Java is not pre-installed on the Raspberry Pi by default. You can install the OpenJDK version of Java on the Raspberry Pi using the apt package manager. To do this, open a terminal and enter the following command:
Code: Select all
sudo apt-get update
sudo apt-get install openjdk-11-jdk
This will install the OpenJDK version of Java 11 on your Raspberry Pi. You can then check if Java is installed correctly by running the command java -version
Note that OpenJDK is an open-source implementation of the Java Platform and is free to use.