Rate This Document
Findability
Accuracy
Completeness
Readability

Installing JDK

openEuler 22.03 LTS is incompatible with BiSheng JDK 1.8_262, which needs to be replaced with BiSheng JDK 1.8.0_342.

  1. 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
    
  2. Configure the JDK environment variables.
    1. Open the profile file.
      1
      vim /etc/profile
      
    2. 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.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Make the environment variables take effect.
    1
    source /etc/profile
    
  4. Check the JDK version.
    1
    java -version