tar zxvf jdk-8u171-linux-x64.tar.gz
mv jdk1.8.0_171 /usr/local/
vi /etc/profile

export JAVA_HOME=/usr/local/jdk1.8.0_171
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH

 

posted on 2018-06-29 09:59  凌度  阅读(174)  评论(0编辑  收藏  举报