diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-01-18 17:58:03 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-01-18 17:58:03 +0000 |
commit | c67b26c138f93ac03f90d52e5c71eaa72e366fec (patch) | |
tree | c1a3ac2d12463e93cae85ea2b60b0171be4882fa /gradlew.bat | |
parent | ab90b2b4534cd700ebdf7f37d683ac5bb9c78fcc (diff) | |
download | poi-c67b26c138f93ac03f90d52e5c71eaa72e366fec.tar.gz poi-c67b26c138f93ac03f90d52e5c71eaa72e366fec.zip |
gradle 6.8
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885668 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gradlew.bat')
-rw-r--r-- | gradlew.bat | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gradlew.bat b/gradlew.bat index ac1b06f938..a9f778a7a9 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
+if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto execute
+if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,6 +64,21 @@ echo location of your Java installation. goto fail
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
:execute
@rem Setup the command line
@@ -71,7 +86,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
|