Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the Java Environment

Procedure

  1. Obtain the Java package jdk-8u152-linux-arm64-vfp-hflt.tar.gz. For details, see the software requirements.
  2. Use PuTTY to log in to the server as the root user.
  3. 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.
  4. Configure environment variables and modify the /root/.bashrc file.
    1. Open the file.
      vi /root/.bashrc
    2. 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
    3. Press Esc, type :wq!, and press Enter to save the file and exit.