Installing JDK
- Download the JDK installation package and decompress it to the installation directory.
1 2
wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz tar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz -C /usr/local
- Configure the JDK environment variables.
- Open the profile file.
1vim /etc/profile - Press i to enter the insert mode and add the JDK path to the profile file.
1 2
export JAVA_HOME=/usr/local/jdk8u282-b08 export PATH=$JAVA_HOME/bin:${PATH}
JAVA_HOME indicates the JDK installation directory. If the JDK version is 342, replace the example directory with the actual installation directory.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the profile file.
- Make the environment variables take effect.
1source /etc/profile
- Check the JDK version.
1java -version
Parent topic: Configuring the Compilation Environment