Installing the Java Environment
Procedure
- Obtain the Java package jdk-8u152-linux-arm64-vfp-hflt.tar.gz. For details, see the software requirements.
- Use PuTTY to log in to the server as the root user.
- Run the following commands to install the Java environment:
mkdir /path/to/HADOOP cd path/to/HADOOP tar -zxvf jdk-8u152-linux-arm64-vfp-hflt.tar.gz
Differences between JRE and JDK:
- The Java Runtime Environment (JRE) is the environment required for Java running.
- The Java Development Kit (JDK) includes the JRE and the tools and class libraries required for Java development.
- Configure environment variables and modify the /root/.bashrc file.
- Open the file.
vi /root/.bashrc
- Press i to enter the insert mode and add the following path to the end of the /root/.bashrc file:
export JAVA_HOME=path/to/HADOOP/jdk1.8.0_171 export JRE_HOME=$JAVA_HOME/jre export PATH=:$JAVA_HOME/bin:$PATH export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
Parent topic: Configuring the Compilation Environment