下载Linux版本的jdk, 百度网盘分享: 链接:https://pan.baidu.com/s/1q3_aK_4JYip2B8F6lA8_TQ 提取码:rca1
上传到Linux环境要解压的目录下
tar -zxvf jdk-8u301-linux-x64.tar.gz
设置环境变量, 修改/etc/profile 文件, 在文件末尾添加以下内容
export JAVA_HOME=/usr/local/jdk1.8.0_301
export JRE_HOME=${JAVA_HOME}/jre
export CLASS_PATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASS_PATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
修改完成后, 执行下面命令, 使环境变量生效
source /etc/profile
查看Java版本号, 版本输出就说明安装成功

Comments | 3 条评论
I was pretty pleased to discover this great site. I need to to thank you for your time for this particularly fantastic read!! I definitely appreciated every part of it and I have you book marked to see new stuff on your blog.
I’m gone to convey my little brother, that he should also
pay a visit this blog on regular basis to get updated from most up-to-date
news.
I was extremely pleased to discover this page. I wanted to thank you for ones time due to this fantastic read!! I definitely liked every part of it and i also have you saved as a favorite to see new stuff on your blog.