aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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