Build a Java development environment under Mac

Source: Internet
Author: User

MAC Configuration Java Development environment: jdk1.7 +sdk1.7+maven +tomcat

1. Install the JDK before installing the SDK. 2 default location for jdk1.7 in Mac:/library/java/javavirtualmachines/jdk1.7.0 _40. Jdk/contents/home configuration Java_home: Opne under the user directory. Bash_profile If you do not have this file, you can create a profile under your Mac./etc/profile file globally shared configuration, regardless of which user Log in, this file is read/ETC/BASHRC (typically add a system-level environment variable in this file) global (public) configuration, which is read by the bash shell, regardless of the way it is executed. ~/.bash_profile (typically add user-level environment variables in this file) Configure the environment: maven_home=/users/taoyutong/documents/apache-maven-3.0.5java_home=/ Library/java/javavirtualmachines/jdk1.7.0_40.jdk/contents/homepath= $MAVEN _home/bin: $PATHPAHT = $JAVA _home/bin:$ PAHT Export Maven_homeexport java_homeexport PATH save exit. Immediate effect requires execution: $ source. Bash_profile (This is the file name) To configure Tomcat:Go to User directory, edit. BASH_PROFILECD ~/vim. Bash_profile added as follows: Export path= $PATH:/usr/local/apache-tomcat-8.0.9/bin- Set permissions for the startup.sh file chmod 755/usr/local/apache-tomcat-8.0.9/bin/*.sh-start tomcatsh startup.sh-test can be used: http://localhost : 8080-Stop tomcatsh shutdown.sh add Admin User: Vim/usr/local/apache-tomcat-7.0.55/conf/tomcat-users.xml<role rolename= " Admin-gui "/> <role rolename=" Admin-script "/> <role rolename=" Manager-gui "/> <role rolename=" Manager-script "/> <role rolename=" manager-jmx "/> <role rolename=" manager-status "/> <user username= "Admin" password= "admin" roles= "Manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/ >
Install SDK Error: This program requires DISPLAY environment variable solution: Vim ~/.bash_profile Add export display=:0 Can: 1, download dedicated Mac version of the jdk1.7, the address is as follows: Https://jdk7.java.net/download.html JDK-7U60-EA-BIN-B15-MACOSX-X86_64-16_APR_2014.DMG 2. Download the SDK index

Build a Java development environment under 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.