安装JDK

jbone最低要求jdk11+

jdk11下载

https://www.oracle.com/technetwork/java/javase/downloads/index.html

解压

tar xzf jdk-11.0.2_linux-x64_bin.tar.gz

配置环境变量

vim /etc/profile

export JAVA_HOME=/opt/soft/jdk/jdk-11.0.2
export PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH
重新登录系统,验证JDK是否安装成功
[root@iZ283gj52dgZ ~]# java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)


原创文章,转载请注明出处:jbone - 安装JDK