--- ./catalina.sh.orig 2005-10-28 01:12:12.000000000 +0400 +++ ./catalina.sh.orig 2005-10-28 01:11:38.000000000 +0400 @@ -45,9 +45,11 @@ # OS specific support. $var _must_ be set to either true or false. cygwin=false os400=false +darwin=false case "`uname`" in CYGWIN*) cygwin=true;; OS400*) os400=true;; +Darwin*) darwin=true;; esac # resolve links - $0 may be a softlink --- ./setclasspath.sh.orig 2005-10-28 01:10:05.000000000 +0400 +++ ./setclasspath.sh.orig 2005-10-28 01:19:52.000000000 +0400 @@ -10,9 +10,13 @@ # Make sure prerequisite environment variables are set if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then - echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined" - echo "At least one of these environment variable is needed to run this program" - exit 1 + if $darwin && [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home" ]; then + export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home" + else + echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined" + echo "At least one of these environment variable is needed to run this program" + exit 1 + fi fi if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then echo "JAVA_HOME should point to a JDK in order to run in debug mode." --- ./startup.sh.orig 2005-10-28 01:10:30.000000000 +0400 +++ ./startup.sh.orig 2005-10-28 01:11:01.000000000 +0400 @@ -7,9 +7,11 @@ # Better OS/400 detection: see Bugzilla 31132 os400=false +darwin=false case "`uname`" in CYGWIN*) cygwin=true;; OS400*) os400=true;; +Darwin*) darwin=true;; esac # resolve links - $0 may be a softlink