一.查询当前系统的对应的架构
![](https://img.haomeiwen.com/i18295877/a5a5942141234da8.png)
![](https://img.haomeiwen.com/i18295877/fcb7f9d1881a3d66.png)
上图aarch64 (arm64)即为本系统的架构
二.下载jdk对应的版本
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
![](https://img.haomeiwen.com/i18295877/fdef4160e2aae2ce.png)
选择下载目录进行下载
![](https://img.haomeiwen.com/i18295877/f11b191f591507fc.png)
在该目录下右击-终端
![](https://img.haomeiwen.com/i18295877/e2f42625854ab168.png)
解压文件
![](https://img.haomeiwen.com/i18295877/7c00b0970d82f6df.png)
切换超级管理员账户
![](https://img.haomeiwen.com/i18295877/70b87e9cfc9661cf.png)
修改环境变量
执行 vim /etc/profile
![](https://img.haomeiwen.com/i18295877/c17afdcdf5d220cc.png)
JAVA_HOME=/data/home/guest/jdk/jdk1.8.0_291
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
:wq
![](https://img.haomeiwen.com/i18295877/81d0561fffa0dad9.png)
重新加载配置
![](https://img.haomeiwen.com/i18295877/5b192672f11a2985.png)
验证:java -version
![](https://img.haomeiwen.com/i18295877/85b51c336674259e.png)
网友评论