Configuring the Java Development environment under MAC installation

Source: Internet
Author: User

You can use homebrew to download the relevant software, the following specifically about the configuration of the environment:

Install JDK under Mac

VI. bash_profile

Enter I, enter edit mode

Enter the following configuration, where Java_home is your JDK installation directory

Java_home=/library/java/javavirtualmachines/jdk1.8.0_121.jdk/contents/home

classpaht=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Export Java_home

Export CLASSPATH

Then press ESC, enter: Wq exit

modifying system files

Cd/etc

Sudo VI Profile

Enter I, enter edit mode

Enter the following configuration, where Java_home is your JDK installation directory

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

Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH

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

Then press ESC, enter: Wq exit

Enter source profile to enable files modified as above

Enter Java-version to see if the installation was successful:

Success is as follows:

Java Version "1.8.0_121"

Java (TM) SE Runtime Environment (build 1.8.0_121-b13)

Java HotSpot (TM) 64-bit Server VM (build 25.121-b13, Mixed mode)

Install Tomcat under Mac

VI. bash_profile

Enter I, enter edit mode

Enter the following configuration, where Tomcat_path is your Tomcat installation directory

tomcat_path=/users/yingmuxiaoge/apache-tomcat-7.0.75

Export=tomcat_path

Install Maven under Mac

VI. bash_profile

Enter I, enter edit mode

Export m2_home=/users/yingmuxiaoge/apache-maven-3.3.9

Export path= $PATH: $M 2_home/bin

Configuring the Java Development environment under MAC installation

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.