Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing the BiSheng JDK

To use the KAE encryption and decryption technology while using the Java virtual machine (JVM), the KAE Provider feature offered by the BiSheng JDK is required. Therefore, you need to compile and install the BiSheng JDK. The following describes how to compile and install the BiSheng JDK.

You can also compile and install the BiSheng JDK by referring to BiSheng JDK 8 Source Code Building Description.

  1. Install the dependencies.
    1
    2
    yum groupinstall "Development Tools"
    yum install cups-devel libXtst-devel libXt-devel libXrender-devel freetype-devel alsa-lib-devel fontconfig-devel
    
  2. Download the BiSheng JDK source package.

    For example, create and download the BiSheng JDK source package in the /home/bishengjdk/ directory. Change the directory as required.

    1
    2
    3
    4
    mkdir -p /home/bishengjdk/
    cd /home/bishengjdk/
    wget -O jdk8u422-ga-b013.zip https://gitee.com/openeuler/bishengjdk-8/repository/archive/jdk8u422-ga-b013 --no-check-certificate
    unzip jdk8u422-ga-b013.zip
    
  3. Download BootJdk and decompress it to a specified directory.

    For example, download BootJdk and decompress it to the /home/bishengjdk/bootjdk_dir directory. Change the directory as required.

    1
    2
    3
    4
    mkdir /home/bishengjdk/bootjdk_dir
    cd /home/bishengjdk/bootjdk_dir
    wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_aarch64_linux_hotspot_8u422b05.tar.gz --no-check-certificate
    tar -zxvf OpenJDK8U-jdk_aarch64_linux_hotspot_8u422b05.tar.gz
    

    After the decompression, the directory structure of /home/bishengjdk/ is as follows:

    1
    2
    3
    4
    5
    ├── bishengjdk-8-jdk8u422-ga-b013
    ├── bootjdk_dir
    │   ├── OpenJDK8U-jdk_aarch64_linux_hotspot_8u422b05.tar.gz
    │   └── jdk8u422-b05
    └── jdk8u422-ga-b013.zip
    
  4. Go to the BiSheng JDK source code directory and perform configuration and compilation.
    1
    2
    3
    4
    cd /home/bishengjdk/bishengjdk-8-jdk8u422-ga-b013
    mkdir install
    bash configure --with-debug-level=release --prefix=$PWD/install --with-boot-jdk=/home/bishengjdk/bootjdk_dir/jdk8u422-b05 --enable-kae
    make install
    

    The --enable-kae option is used to compile the KAE Provider feature to support hardware-based acceleration of Kunpeng processors.

  5. Set the environment variables.
    1. Open the /etc/profile file.
      1
      vi /etc/profile
      
    2. Press i to enter the insert mode and add the following content to the file:
      1
      2
      3
      4
      export JAVA_HOME=/home/bishengjdk/bishengjdk-8-jdk8u422-ga-b013/install/jvm/openjdk-1.8.0_422-internal
      export PATH=$JAVA_HOME/bin:$PATH
      export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
      export JRE_HOME=$JAVA_HOME/jre
      
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the configuration take effect.
      1
      source /etc/profile
      
  6. Check the Java version to verify that the BiSheng JDK has been successfully installed.
    1
    java -version
    

    If "OpenJDK Runtime Environment (build 1.8.0_422-internal-root_yyyy_mm_dd_hh_mm-b00)" is returned, the compilation and installation are successful.

    After all the preceding steps are complete, the BiSheng JDK that supports KAE encryption and decryption is compiled and installed.