sudo ls -l /opt/MPP
cd /opt/MPP
sudo mkdir -p /opt/MPP
sudo chown -R tydic:tydic /opt/MPP
sudo chmod -R 751 /opt/MPP
#下载jdk1.8.0_192.tar.gz
cd /opt/MPP/
tar -zxvf jdk1.8.0_192.tar.gz
sudo ln -s /opt/MPP/jdk1.8.0_192 /usr/local/share/applications/jdk
#配置环境变量
vi ~/.bash_profile
## JDK1.8 ##
export JAVA_HOME=/usr/local/share/applications/jdk
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$HOME/bin
## JDK1.8 ##
#立即生效
source ~/.bash_profile
java -version
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)