]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2356: default JAVA_HOME is not compatible with Oracle's JDK on Mac OS X
authorSimon Steiner <ssteiner@apache.org>
Fri, 18 Dec 2015 15:28:29 +0000 (15:28 +0000)
committerSimon Steiner <ssteiner@apache.org>
Fri, 18 Dec 2015 15:28:29 +0000 (15:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1720811 13f79535-47bb-0310-9956-ffa450edef68

fop

diff --git a/fop b/fop
index 3f2ac6f7deee3b722ada98285bf6bf3e604f1e43..27080935a358941c9ddbfc884fcac2c8b03a08fd 100755 (executable)
--- a/fop
+++ b/fop
@@ -80,7 +80,11 @@ case "`uname`" in
   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
            ;;
 esac