This is how I pulled together my Java dev environment in Tiger. I started off pretty clueless, and what guidance I could find via Google was fragmented and/or out of date. So here’s my setup. If any of you experts out there have suggestions / corrections, please send ‘em my way.

For reference, here are the versions I installed:

  • Java 1.5
  • Eclipse 3.2
  • Tomcat 5.5
  • Ant 1.7
  • WTP 1.5.2
  • Subversion 1.3
  • Subclipse 1.0.5
  • MySQL 5
  • Spring 2.0.1
  • GreenUML 2.5.0

1. Install OS X developer tools

2. Run software update and install all updates (esp. Java—this will update from 1.4 to 1.5)

3. Install MySQL

4. Install Tomcat 5.x

> sudo su –
> mv /Users/{username}/Desktop/apache-tomcat-5.5.20.tar.gz /usr/local/
> cd /usr/local
> gnutar -xzvf apache-tomcat-5.5.20.tar.gz
> ln -s apache-tomcat-5.5.20 tomcat
> rm apache-tomcat-5.5.20.tar.gz
> chown -R {username}:{username} apache-tomcat-5.5.20

5. Install Ant 1.7

> mv /Users/{username}/Desktop/apache-ant-1.7.0-bin.tar.gz /usr/local/
> cd /usr/local
> gnutar -xzvf apache-ant-1.7.0-bin.tar.gz
> ln -s apache-ant-1.7.0 ant
> rm apache-ant-1.7.0-bin.tar.gz
> exit

6. Install Subversion 1.3

7. Set JAVA_HOME / CATALINA_HOME / ANT_HOME / PATH

  • Create /Users/{your_username}/.bash_profile if it doesn’t already exist
  • Add the following to it (using vim, emacs, or your text editor of choice):

export JAVA_HOME=”/Library/Java/Home”
export CATALINA_HOME=”/usr/local/tomcat”
export ANT_HOME=”/usr/local/ant”
export PATH=”$PATH:/usr/local/bin:/usr/local/subversion/bin: \
/usr/local/mysql/bin:$ANT_HOME/bin”

8. Create a MySQL database and a user for your project

> mysql -u root
mysql> CREATE DATABASE projectdb;
mysql> GRANT ALL PRIVILEGES ON projectdb.* TO \
‘projectuser’@’localhost’;
mysql> exit

9. Install Eclipse 3.2.1

10. Install Spring IDE

11. Install Eclipse Web Tools Project (WTP)

  • As for Spring IDE, go to Help > Software Updates > Find and Install
  • Select “Search for new features to install”
  • Select Callisto Discovery Site, and Web Tools Platform Updates
  • In the Search Results window, select WTP Updates > Web Tools Platform and WTP Patches
  • Expand Callisto Discovery Site, and click “Select Required”
  • Click Next, Accept (Next), Finish, (files download) Install All
  • Restart Eclipse as prompted
  • Open Eclipse > Preferences
  • Go to Server > Installed Runtimes
  • Click “Add”
  • Find Apache > Apache Tomcat v5.5
  • Enter /usr/local/tomcat as the Tomcat installation directory
  • Click Finish, then OK.

12. Install Subclipse

  • Download from http://subclipse.tigris.org
  • As for Spring IDE, go to Help > Software Updates > Find and Install
  • Select “Search for new features to install”
  • Click “New Remote Site…”
  • Name the site “Subclipse”; URL: http://subclipse.tigris.org/update_1.0.x
  • Click OK
  • Make sure Subclipse is selected; hit Finish
  • In Search Results, expand Subclipse and select it
  • Click Next, Accept (Next), Finish, (files download) Install All
  • Restart Eclipse as prompted
  • Open the SVN Repository perspective and define your repository

13. Install GreenUML

14a. If you have an existing project, check it out from subversion.

14b. If you need to create a new Spring project, download spring-framework-2.0.1-with-dependencies.zip from http://www.springframework.org/download