From a35d7a7c5ed5637fdb14339a93361cce442aef88 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Fri, 18 Dec 2015 15:28:29 +0000 Subject: 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 --- fop | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3