From: Simon Steiner Date: Fri, 18 Dec 2015 15:28:29 +0000 (+0000) Subject: FOP-2356: default JAVA_HOME is not compatible with Oracle's JDK on Mac OS X X-Git-Tag: fop-2_1~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a35d7a7c5ed5637fdb14339a93361cce442aef88;p=xmlgraphics-fop.git FOP-2356: default JAVA_HOME is not compatible with Oracle's JDK on Mac OS X git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1720811 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/fop b/fop index 3f2ac6f7d..27080935a 100755 --- 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