install java 11 jdk raspberry pi

https:‮/‬/www.lautturi.com
install java 11 jdk raspberry pi

To install the Java 11 JDK on a Raspberry Pi, you can follow these steps:

  1. Download the Java 11 JDK Linux ARM 32-bit tar.gz file from the Oracle website.

  2. Extract the tar.gz file:

tar -xvf openjdk-11.0.10_arm-32.tar.gz
  1. Move the extracted directory to the desired installation location:
sudo mv jdk-11.0.10 /usr/lib/jvm/jdk-11
  1. Update the PATH environment variable:
sudo nano /etc/environment

Add the following line to the end of the file:

PATH="/usr/lib/jvm/jdk-11/bin:${PATH}"
  1. Reload the environment file:
source /etc/environment
  1. Set the default Java version to Java 11:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-11/bin/java 1
  1. Verify that Java 11 is installed and set as the default:
java -version

Note that these steps will install the Oracle version of Java 11. If you prefer to install the OpenJDK version of Java 11, you can download it from the OpenJDK website.

For more information on installing Java on a Raspberry Pi, you can refer to the Oracle documentation or the OpenJDK documentation.

Created Time:2017-11-01 22:29:52  Author:lautturi