MAC JAVA Environment variables and MAVEN environment variables

Source: Internet
Author: User
(1) Java Environment 1: Configure Java Environment variables

Export Java_home= "/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home"

Export path= "$JAVA _home/bin: $PATH"



Execute the command to make it effective source. bash_profile

MAVEN Environment
1: The first step to download maven currently the latest MAVEN 3.3 download address: http://maven.apache.org/download.cgi Address: http://apache.fayea.com/maven/maven-3/ 3.3.3/binaries/apache-maven-3.3.3-bin.zip

2: Unzip the downloaded maven3.3 to the/user/local/maven
3: Configure MAVEN's environment variables

Export Java_home= "/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home"

Export path= "$JAVA _home/bin: $PATH"


Export M2_home= "/usr/local/maven"

Export m2= "$M 2_home/bin"

Export Path= "$M 2: $PATH"

Export path= "/usr/local/mysql/bin: $PATH"
Execute the command to make it effective source. bash_profile

4: Does the test come into effect mvn-version

$ mvn-version

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)

Maven Home:/usr/local/maven

Java version:1.8.0_40, Vendor:oracle Corporation

Java Home:/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home/jre

Default LOCALE:ZH_CN, Platform Encoding:utf-8

OS name: "Mac OS X", Version: "10.10.4", Arch: "X86_64", Family: "Mac"


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.