1: Install the JDK and go directly to the next step.
2: Install maven, first download maven:http://maven.apache.org/download.cgi
3: Extract to Folder after download
4: Open the terminal configuration as follows:
Execute command: Touch ~/.bash_profile
Vim ~/.bash_profile #进入vi模式进行编辑
Copy the following configuration in. Change the path of your files.
Export Java_home= "/library/java/javavirtualmachines/jdk1.8.0_131.jdk/contents/home"
Export path= "$JAVA _home/bin: $PATH"
Export M2_home= "/users/lh/downloads/apache-maven-3.5.0"
Export m2= "$M 2_home/bin"
Export Path= "$M 2: $PATH"
Export path= "/usr/local/mysql/bin: $PATH
Final execution command: Wq #保存文件并退出
In execution: Mvn-v to see if the installation was successful, as indicated by the installation.
PS: The first sentence for your JDK installation location, command line view JDK location:/usr/libexec/java_home
The third sentence corresponds to your Maven file address.
Record the installation of MAVEN,JDK in Mac, as well as command Learning!!!