1.官网下载JDK安装包
https://www.oracle.com/java/technologies/downloads/#java17
http://jdk.java.net/18/
2.上传安装包之linux
3.解压安装包至/root/java目录下
tar -zxvf jdk-17_linux-x64_bin.tar.gz -C /root/java
4.配置环境变量
export JAVA_HOME=/root/java/jdk17
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
5.生效.bashrc
source .bashrc
6.验证java
java -version
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)