Linux配置java环境
1.下载jdk
https://www.oracle.com/technetwork/java/javase/downloads/index.html
2. 上传解压到
mkdir /usr/jdk
3.配置环境
vim /etc/profile
3.修改配置文件
export JAVA_HOME=/usr/jdk/jdk1.8.0_211
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
5.刷新环境
source /etc/profile
java -version