Commits

Anonymous committed 6817fad

port Tomcat's logic for setting JAVA_HOME to an script - PR 52632

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@143468013f79535-47bb-0310-9956-ffa450edef68

  • Participants
  • Parent commits cf8eea3

Comments (0)

Files changed (2)

  * Zip task on <mappedresources> that excludes certain files by way of the mapper resulted in a NullPointerException
    Bugzilla Report 54026
 
+ * The ant launcher script should properly detect JAVA_HOME on
+   MacOS X 10.7
+   Bugzilla Report 52632
 
 Other changes:
 --------------
   CYGWIN*) cygwin=true ;;
   Darwin*) darwin=true
            if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+               if [ -x '/usr/libexec/java_home' ] ; then
+                   JAVA_HOME=`/usr/libexec/java_home`
+               elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
+                   JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
+               fi
            fi
            ;;
   MINGW*) mingw=true ;;