【刘建】Linux配置java环境

1、scp /Users/shanguangqing/Desktop/packages/jdk/jdk-8u281-linux-x64.tar.gz [email protected]:/usr/packages
2tar -zxvf jdk-8u281-linux-x64.tar.gz -C /usr/local/
2:cd /usr/local/
mkdir java
mv jdk1.8.0_281/ java/jdk1.8
3: vi /etc/profile
配置信息如下

------java-------

export JAVA_HOME=/usr/local/java/jdk1.8
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

4:source /etc/profile
5:java -version

你可能感兴趣的:(linuxjava后端)