标签:配置环境 lib java_home $path classpath tar time 安装 解压
下载安装文件https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
mkdir /usr/java
tar xf jdk-8u212-linux-x64.tar.gz -C /usr/java/
vim /etc/profile
#java
export JAVA_HOME=/usr/java/jdk1.8.0_212
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /etc/profile
[root@jenkins ~]# java -version
java version "1.8.0_212"
Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)
标签:配置环境 lib java_home $path classpath tar time 安装 解压
原文地址:https://blog.51cto.com/jinkcloud/2407381