centos安装配置openjdk15.01
官网:
http://jdk.java.net/15/
下载解压
cd /opt/
wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
tar zxvf openjdk-15.0.1_linux-x64_bin.tar.gz
chmod -R 755 jdk-15.0.1
在/etc/profile
追加:
export JAVA_HOME=/opt/jdk-15.0.1
export JRE_HOME=$JAVA_HOME/jre
export JAVA_BIN=$JAVA_HOME/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
刷新生效
source /etc/profile
验证下版本
[root@localhost jdk-15.0.1]# java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)