MAC Configuration Java/maven Development Environment tutorial

Source: Internet
Author: User

Configure Java_home:

User directory under Opne. Bash_profile If you don't have this file, you can create a

Can understand the configuration file under the Mac

The./etc/profile file has a global shared configuration, which is read by whichever user logs on
/ETC/BASHRC (typically adds system-level environment variables to this file) global (public) configuration, which is read by the bash shell whenever it is executed, regardless of the method.
~/.bash_profile (typically add user-level environment variables to this file)

Configuration 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 exit.

Immediate entry into force requires execution: $ source. Bash_profile (This is the filename)



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

1. Install the JDK before installing the SDK.
2 mac jdk1.7 default location:/library/java/javavirtualmachines/jdk1.7.0_40.jdk/contents/home

Configure Java_home:
User directory under Opne. Bash_profile If you don't have this file, you can create a

Can understand the configuration file under the Mac
The./etc/profile file has a global shared configuration, which is read by whichever user logs on
/ETC/BASHRC (typically adds system-level environment variables to this file) global (public) configuration, which is read by the bash shell whenever it is executed, regardless of the method.
~/.bash_profile (typically add user-level environment variables to this file)

Configuration 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 exit.


Immediate entry into force requires execution: $ source. Bash_profile (This is the filename)

Configure Tomcat:


Enter user directory, edit. Bash_profile
CD ~/
Vim. Bash_profile
Added as follows:
Export path= $PATH:/usr/local/apache-tomcat-8.0.9/bin

-Set permissions on startup.sh files
chmod 755/usr/local/apache-tomcat-8.0.9/bin/*.sh
-Start Tomcat
SH startup.sh
-Test
You can use: http://localhost:8080
-Stop Tomcat
SH 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

Download Address:
1, download the Mac version of the special 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

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.