Linux安装JDK

mkdir /usr/local/java
mv jdk1.8.0_161 /usr/local/java/
vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_161  #jdk安装目录
 
export JRE_HOME=${JAVA_HOME}/jre
 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
 
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
 
export PATH=$PATH:${JAVA_PATH}
source /etc/profile
posted @ 2020-12-07 14:44  不爱吃西红柿  阅读(42)  评论(0编辑  收藏  举报