Installing JDK 8
Procedure
- Use PuTTY to log in to the server as the root user.
- Go to the installation directory.
cd /path/to/JDK8
- Decompress the package.
tar -zxvf jdk-8u341-linux-aarch64.tar.gz
- Set the environment variables.
vim ~/.bashrc
Add the following content to the end of the .bashrc file:
#set java environment JAVA_HOME=/path/to/JDK8/jdk1.8.0_341/ JRE_HOME=/path/to/JDK8/jdk1.8.0_341/jre CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH export JAVA_HOME JRE_HOME CLASS_PATH PATH
Make the environment variables take effect.
source ~/.bashrc
- Perform the verification.
java -version
Parent topic: Configuring the Compilation Environment