一 Mac配置JDK和Maven
1.安装成功jdk后
2.打开终端后,输入vim ~/.bash_profile
3.输入:
export MAVEN_HOME=/usr/local/maven/apache-maven-3.6.1 export PATH=$PATH:$MAVEN_HOME/bin export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home export CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH: |
4.esc+:wq
5.source ~/.bash_profile
6.检查环境:java -version mvn -v