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