目录
jdk环境
vim /etc/profile
export JAVA_HOME=/opt/java
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
标签:profile,JRE,JAVA,etc,export,Liunx,HOME,环境变量,模板 From: https://www.cnblogs.com/hhddd-1024/p/16727139.htmlecho 'export JAVA_HOME=/opt/java' >> /etc/profile && echo 'export JRE_HOME=$JAVA_HOME/jre' >> /etc/profile && echo 'export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH' >> /etc/profile && echo 'export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH' >> /etc/profile && source /etc/profile