jdk配置
tomcat安装
sudo mkdir -p /usr/local sudo mv ~/Downloads/apache-tomcat-7.0.59 /usr/local
sudo rm -f /Library/Tomcat
sudo ln -s /usr/local/apache-tomcat-7.0.59 /Users/lixiaolong/Documents/lxl/java/tomcat
sudo chown -R lixiaolong /Users/lixiaolong/Documents/lxl/java/tomcat
sudo chmod +x /Users/lixiaolong/Documents/lxl/java/tomcat/bin/*.sh
Maven安装 类似tomcat
maven 配置
JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home'
export JAVA_HOME
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH
export PATH
export M2_HOME=/usr/local/apache-maven-3.5.0
export PATH=$PATH:$M2_HOME/bin