Record the installation of MAVEN,JDK in Mac, as well as command Learning!!!

Source: Internet
Author: User

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!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.