Configure the Java development environment in your Mac

Source: Internet
Author: User

Recently bought a Mac Pro, at home in the evening to write Java, in the configuration environment encountered a lot of problems, now summed up, to provide to everyone.

1. Configure Tomcat

1. Download:

Download the latest Tomcat binary package (note: Mac version of the. GZ package) from the Apache official website (http://tomcat.apache.org/), and I'm currently downloading the TOMCAT8

2, the above-mentioned binary package after decompression renamed to Tomcat8, and copied to the/library directory

New Finder window--shift + Command + g--input/library, enter this directory

Copy the Tomcat8 folder to this directory

3. Modify Permissions

Open terminal, input cd/library/tomca8t/bin input sudo chmod 755/library/tomcat8

4. Execute the startup.sh file under the/library/tomcat8/bin directory

In the terminal input command: sudo sh startup.sh or sudo./startup.sh start command starts Tomcat

In the terminal input command: sudo sh shutdown.sh or sudo./shutdown.sh Stop command to close Tomcat

If the boot Tomcat service is encountered, the file is absent or does not has EXECUTE permission

The terminal prompts are as follows:

Cannot find bin/catalina.sh

The file is absent or does not has EXECUTE permission

This file is needed to run

Description Modify permission not successful

In terminal input chmod 777 *.sh

5. Verify that Tomcat is installed successfully

After you start Tomcat, open http://localhost:8080 to see if Tomcat has started.

2. Configuring Tomcat in Eclipse

After installing the TOMCA, you are ready to configure Tomcat in Eclipse, and the online query says to download a tomcat plugin to the Eclipse plugin directory, but now that the new version of Eclipse for MAC does not have a directory installed, After downloading the website directly unzip can run, so the download Tomcat method is not feasible.

Later found directly in Eclipse can be configured:
1. Open Eclipse Preferences and select Server–>server Runtime Environment



Click Add to add Tomcat


This is when Tomcat is configured.

When running as server, select Tomcat to run.

Configuring the Java Development environment in your 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.