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

Source: Internet
Author: User

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:
User directory under Opne. Bash_profile If you don't have this file, you can create a

You can learn about the configuration file under Mac
The./etc/profile file is globally shared and will be read by any user who logs on
/ETC/BASHRC (typically adds a system-level environment variable to 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 to this file)

Configure the Environment:

maven_home=/users/taoyutong/documents/apache-maven-3.0.5
Java_home=/library/java/javavirtualmachines/jdk1.7.0_40.jdk/contents/home
Path= $MAVEN _home/bin: $PATH
paht= $JAVA _home/bin: $PAHT

Export Maven_home
Export Java_home
Export PATH

Save to exit.
Immediate effect requires execution: $ source. Bash_profile (This is the file name)

To configure Tomcat:
Go to User directory, edit. Bash_profile
CD ~/
Vim. Bash_profile
Add the following:
Export path= $PATH:/usr/local/apache-tomcat-8.0.9/bin

-Set permissions for startup.sh files
chmod 755/usr/local/apache-tomcat-8.0.9/bin/*.sh
-Start Tomcat
SH startup.sh
-Test
can use: http://localhost:8080
-Stop Tomcat
SH shutdown.sh

Add Administrative 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

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

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.