Linux安装JDK15
- 摘要:1.下载64位JKD15.0.1.tar.gz地址:https://www.oracle.com/java/technologies/javase-jdk15-downloads.html2.上传jdk到Linux指定目录并解压tar-zxvfjdk-15.0.1_linux-x64_bin.tar.gz3.设置系统环境变量:修改/etc/environment,增加如下配置:exportJAVA_HOME=/usr/java/jdk-15.0.1exportJRE_HOME=$
- 标签:Linux 安装 jdk
1.下载64位JKD 15.0.1.tar.gz
地址:https://www.oracle.com/java/technologies/javase-jdk15-downloads.html
2.上传jdk到Linux指定目录并解压
tar -zxvf jdk-15.0.1_linux-x64_bin.tar.gz
3.设置系统环境变量:修改/etc/environment,增加如下配置:
export JAVA_HOME=/usr/java/jdk-15.0.1
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
4.设置用户环境变量:修改/etc/profile,增加如下配置:
export JAVA_HOME=/usr/java/jdk-15.0.1
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
5.执行命令source profile,使修改文件生效;
6.执行java -version