The new ant wrapper shell script automatically determines what the JAVA_HOME variable should be set to, but it should also export the variable so the entire ant build process can have access to it. For instance, I use ant to build my java files, create my native JNI headers using javah, and then to compile the native code by exec-ing a shell script which I populate from the ant buildl.xml. Within this script I need to know where JAVA_HOME is so I can include the jni.h file in my C compilation path. Previous to your new wrapper script, I had my own, which exported JAVA_HOME and all worked wonderfully. I have made the following one line change to your script and would suggest something similar: case "`uname`" in CYGWIN*) cygwin=true ;; Darwin*) darwin=true if [ -z "$JAVA_HOME" ] ; then JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export JAVA_HOME fi ;; esac Thanks for listening, and keep up the excellent work! Ant is great! Cheers, Levi
*** This bug has been marked as a duplicate of 24553 ***
This bug was closed because "This bug has been marked as a duplicate of 24553" which is incorrect. Bug 24553 is dealing with ANT_HOME, while this bug is related to JAVA_HOME which are completely different.
Oops, yes, sorry.