Get going with Tomcat & Eclipse on OSX

I recently had to move a project off of Google App Engine. To my surprise, Google App Engines performance was just not fast enough for this project.

In any case, this lead to my installation of Tomcat on OSX and integrating into Eclipse so here is how to do it:

  1. Get the latest tomcat: You need to make sure you get the tar or zip file.
  2. Move the download to /usr/local/.
  3. Start a super shell:
  4. $ sudo sh
  5. If you downloaded the tar, you may have noticed the warning that it will not work with OSX tar command, so make sure to use gnutar which comes with OSX.
  6. $ gnutar xzvf apache-tomcat-6.0.26.tar.gz
  7. Now you can change owner ship on this new folder so you can start and stop tomcat without having to sudo, but I left it as is.
  8. Create a link to the folder so that you make your life eaiser in the long term when you install newer versions:
  9. $ ln -s apache-tomcat-6.0.26 tomcat
  10. Go back to your home folder and create a new script :
  11. #!/bin/sh
    export CATALINA_HOME=/usr/local/tomcat
    export JAVA_HOM=/usr
    if [ "$1" == "start" ] ; then
  12. Now you can start and stop tomcat from your home folder
  13. $ sudo ./ start  <== To start
    $ sudo ./        <== To stop

Now that Tomcat is setup, you need to configure it in Eclipse:

  1. Go to Eclipse Preferences ->Server -> Runtime Environments
  2. Click Add and select the right Tomcat Version
  3. Put in /usr/local/tomcat for the Tomcat Installation directory (the link we created above)
  4. Click Finish and you should be setup
    1. Good Luck!






Leave a Reply

Your email address will not be published. Required fields are marked *