---
title: 安装JDK
description: "openEuler 22.03 LTS与BiSheng JDK 1.8_262不兼容，需更换为BiSheng JDK 1.8.0_342(https://mirror.iscas.ac.cn/kunpeng/archive/compiler/bisheng_jdk/bisheng-jre-8u342-linux-aarch64.tar.gz)。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2200/bds/kunpengbdssparkml_20_0014.html
sourcePath: /source/zh/kunpengboostkithistory/2200/bds/kunpengbdssparkml_20_0014.html
indexId: 31b615390fa55c4ae4c8bf52031183efc99dbc8aa4340cb33e2b64b6f8fd41d973
---
# 安装JDK

openEuler 22.03 LTS与BiSheng JDK 1.8_262不兼容，需更换为BiSheng JDK 1.8.0_342(https://mirror.iscas.ac.cn/kunpeng/archive/compiler/bisheng_jdk/bisheng-jre-8u342-linux-aarch64.tar.gz)。


1. 下载JDK安装包并解压至安装目录。
  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. 配置JDK环境变量。

  a. 打开profile文件。
    1 vim /etc/profile

  b. 按“i”进入编辑模式，在profile文件中添加JDK的PATH。
    1 2 export JAVA_HOME=/usr/local/jdk8u282-b08 export PATH=$JAVA_HOME/bin:${PATH}

    JAVA_HOME为JDK的安装路径，如使用JDK342需要修改为相对应的安装目录。

  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
3. 使环境变量生效。
  1 source /etc/profile

4. 查看JDK版本。
  1 java -version
