Step 1: Open up the External Tools Configurations in Eclipse. In Eclipse's toolbar click on the little icon with a run symbol and the toolbox, then External Tools Configurations... .
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha8dMHBnvI7vEzz0vNrQfpA4Le22FjUSDEBevVUrVjEPcs0k1wAjqCppPmNUhlW2uzTCixYD0IQ49qjqCw3c-eKrtRkWHlgUS_fOrZmR1iLc-Y9n-HrLebCwvM6D4C2gbIzg_cbeqwCek/s400/Picture+3.png)
Step 2: In the dialog box that pops up, right-click on Program and select "New".
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPoeaqdAjRoyc77iaSEUnpSPArtNgrfmb_Um3QfTvSvCo5v5pkCsztuVOr0YVtTedlFhS2YqCu12ch9GAcE3LFMGQlfqWYhjOmKwwRdQikUVgjhsyLY_4yFtrFo39dK9t8M1qEvuuNyrI/s400/Picture+4.png)
Step 3: Give the new run configuration a name such as "Stop Tomcat", and in the "Location" text field enter "/Library/Tomcat/bin/shutdown.sh". You need to adjust the path of the shutdown.sh to match the file's location on your computer. Also, if you're using a Windows machine you need to call shutdown.bin instead. Click "Run".
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAr8BEAVwNrSGSKerTKGHqCtdquqKQlc-zM60RSBTQUMq9_Ls0-dXjNAhhCrPJUmui_-E2w03n48ZQvj0ISmBEe_2M7dV3GMn7Bfb_SQNnkfKthaeeKy8pp_9pHzOeCZugAViklLD8w_Q/s400/Picture+5.png)
Step 4: Create another configuration for starting Tomcat be repeating steps 1 through 3.
From now on, starting and stopping Tomcat as well as building your projects is accessible with a click of the mouse. Just click the little down-arrow next to that icon with a run symbol and the toolbox, and you'll see a list of the run configurations that you have set up.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp1NXCpTL8hZoLL8yO5CKB6X2hQuZWh4CrGc2CZmlz_dlBUos0sYwWta2Cv9dNFrfCW5G0dWMLF0fIh85duAYl0KnBPLK6nAf1fi-cpBQjX96Fyfs_WkRdbxqyhFWEphwjFgJ_TR8370Y/s400/Picture+6.png)
Piece of Cake!!
3 comments:
It says CATALINE_HOME isn't defined correctly. Where do I define that from inside eclipse?
My guess is that somewhere in shutdown.sh or startup.sh, there is a variable called CATALINE_HOME that isn't defined correctly. That isn't a problem related to running that script in Eclipse. Good luck!
I had this problem and solved it by setting the working directory in the run configuration.
Post a Comment