| 
85 | 85 | APP_BASE_NAME=${0##*/}  | 
86 | 86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit  | 
87 | 87 | 
 
  | 
88 |  | -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.  | 
89 |  | -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'  | 
90 |  | - | 
91 | 88 | # Use the maximum available, or set MAX_FD != -1 to use that value.  | 
92 | 89 | MAX_FD=maximum  | 
93 | 90 | 
 
  | 
@@ -133,26 +130,29 @@ location of your Java installation."  | 
133 | 130 |     fi  | 
134 | 131 | else  | 
135 | 132 |     JAVACMD=java  | 
136 |  | -    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.  | 
 | 133 | +    if ! command -v java >/dev/null 2>&1  | 
 | 134 | +    then  | 
 | 135 | +        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.  | 
137 | 136 | 
  | 
138 | 137 | Please set the JAVA_HOME variable in your environment to match the  | 
139 | 138 | location of your Java installation."  | 
 | 139 | +    fi  | 
140 | 140 | fi  | 
141 | 141 | 
 
  | 
142 | 142 | # Increase the maximum file descriptors if we can.  | 
143 | 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then  | 
144 | 144 |     case $MAX_FD in #(  | 
145 | 145 |       max*)  | 
146 | 146 |         # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.  | 
147 |  | -        # shellcheck disable=SC3045   | 
 | 147 | +        # shellcheck disable=SC3045  | 
148 | 148 |         MAX_FD=$( ulimit -H -n ) ||  | 
149 | 149 |             warn "Could not query maximum file descriptor limit"  | 
150 | 150 |     esac  | 
151 | 151 |     case $MAX_FD in  #(  | 
152 | 152 |       '' | soft) :;; #(  | 
153 | 153 |       *)  | 
154 | 154 |         # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.  | 
155 |  | -        # shellcheck disable=SC3045   | 
 | 155 | +        # shellcheck disable=SC3045  | 
156 | 156 |         ulimit -n "$MAX_FD" ||  | 
157 | 157 |             warn "Could not set maximum file descriptor limit to $MAX_FD"  | 
158 | 158 |     esac  | 
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then  | 
197 | 197 |     done  | 
198 | 198 | fi  | 
199 | 199 | 
 
  | 
 | 200 | + | 
 | 201 | +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.  | 
 | 202 | +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'  | 
 | 203 | + | 
200 | 204 | # Collect all arguments for the java command;  | 
201 | 205 | #   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of  | 
202 | 206 | #     shell script including quotes and variable substitutions, so put them in  | 
 | 
0 commit comments