vi ~/.bash_profile
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home #jdk安装路径
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
:wq 保存后退出
更新配置文件 source ~/.bash_profile,完成
M2_HOME=/softWare/IT/iT_maven/apache-maven-3.3.9
PATH=$M2_HOME/bin:$PATH
export M2_HOME
export PATH
export PATH=$PATH:/softWare/IT/iT_tomcat9/apache-tomcat-9.0.0.M26/bin/
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home #jdk安装路径
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
:wq 保存后退出
更新配置文件 source ~/.bash_profile,完成
M2_HOME=/softWare/IT/iT_maven/apache-maven-3.3.9
PATH=$M2_HOME/bin:$PATH
export M2_HOME
export PATH
export PATH=$PATH:/softWare/IT/iT_tomcat9/apache-tomcat-9.0.0.M26/bin/