Assuming you upgraded to OSX 10.6 from 10.5, you should have JDK v1.5 installed next to JDK 1.6, otherwise you can download it from Apple .
You can then create the application using ant and JDK 1.5. Note: ant relies on the value set for the JAVA_HOME environment variable.
You can, for example, edit your /Users/name/.bash_profile to include these values based on the actual path to the installation location of your JDKs:
JAVA_HOME_14=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home JAVA_HOME_15=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home JAVA_HOME_16=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home export JAVA_HOME=$JAVA_HOME_15 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
So when you need to switch to JDK 1.6, just replace
export JAVA_HOME=$JAVA_HOME_15
with:
export JAVA_HOME=$JAVA_HOME_16
source share