标签:path java linu file exp amp home export dt.jar
1、shell脚本安装jdk 提前把jdk安装包放在 /usr/local 下 [root@bogon ~]# cat jdk.sh #!/bin/bash cd /usr/local/ && tar xf jdk-8u171-linux-x64.tar.gz cat >> /etc/profile << EOF export JAVA_HOME=/usr/local/jdk1.8.0_171/ export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin EOF source /etc/profile && java -version
标签:path java linu file exp amp home export dt.jar
原文地址:https://www.cnblogs.com/effortsing/p/10017217.html