aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2015-12-18 15:28:29 +0000
committerSimon Steiner <ssteiner@apache.org>2015-12-18 15:28:29 +0000
commita35d7a7c5ed5637fdb14339a93361cce442aef88 (patch)
treed202de24a9645196bf6b53d9f8d9806cfaa77f44
parent801be643b783bb848056020097018656ef5cbd10 (diff)
downloadxmlgraphics-fop-a35d7a7c5ed5637fdb14339a93361cce442aef88.tar.gz
xmlgraphics-fop-a35d7a7c5ed5637fdb14339a93361cce442aef88.zip
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
-rwxr-xr-xfop6
1 files changed, 5 insertions, 1 deletions
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