install java raspberry pi code example

Example 1: java cmd install raspbian

sudo apt-get install default-jdk

Example 2: install java 11 jdk raspberry pi

sudo update-alternatives --install /usr/bin/java java /opt/jdk/zulu11.31.16-ca-jdk11.0.3-linux_aarch32hf/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/zulu11.31.16-ca-jdk11.0.3-linux_aarch32hf/bin/javac 1

Example 3: install java 11 jdk raspberry pi

sudo wget http://cdn.azul.com/zulu-embedded/bin/zulu11.31.16-ca-jdk11.0.3-linux_aarch32hf.tar.gz
sudo tar -xfvz zulu11.31.16-ca-jdk11.0.3-linux_aarch32hf.tar.gz
sudo rm *.tar.gz

Example 4: install java 11 jdk raspberry pi

dpkg --print-architecture

Example 5: install java 11 jdk raspberry pi

java --version

Tags:

Java Example