@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
29
29
set APP_BASE_NAME = %~n0
30
30
set APP_HOME = %DIRNAME%
31
31
32
+ @ rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+ for %%i in (" %APP_HOME% " ) do set APP_HOME = %%~fi
34
+
32
35
@ rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33
36
set DEFAULT_JVM_OPTS = " -Xmx64m" " -Xms64m"
34
37
@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
37
40
38
41
set JAVA_EXE = java.exe
39
42
%JAVA_EXE% -version > NUL 2 >& 1
40
- if " %ERRORLEVEL% " == " 0" goto init
43
+ if " %ERRORLEVEL% " == " 0" goto execute
41
44
42
45
echo .
43
46
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -51,7 +54,7 @@ goto fail
51
54
set JAVA_HOME = %JAVA_HOME:" =%
52
55
set JAVA_EXE = %JAVA_HOME% /bin/java.exe
53
56
54
- if exist " %JAVA_EXE% " goto init
57
+ if exist " %JAVA_EXE% " goto execute
55
58
56
59
echo .
57
60
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -61,28 +64,14 @@ echo location of your Java installation.
61
64
62
65
goto fail
63
66
64
- :init
65
- @ rem Get command-line arguments, handling Windows variants
66
-
67
- if not " %OS% " == " Windows_NT" goto win9xME_args
68
-
69
- :win9xME_args
70
- @ rem Slurp the command line arguments.
71
- set CMD_LINE_ARGS =
72
- set _SKIP = 2
73
-
74
- :win9xME_args_slurp
75
- if " x%~1 " == " x" goto execute
76
-
77
- set CMD_LINE_ARGS = %*
78
-
79
67
:execute
80
68
@ rem Setup the command line
81
69
82
70
set CLASSPATH = %APP_HOME% \gradle\wrapper\gradle-wrapper.jar
83
71
72
+
84
73
@ rem Execute Gradle
85
- " %JAVA_EXE% " %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% " -Dorg.gradle.appname=%APP_BASE_NAME% " -classpath " %CLASSPATH% " org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74
+ " %JAVA_EXE% " %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% " -Dorg.gradle.appname=%APP_BASE_NAME% " -classpath " %CLASSPATH% " org.gradle.wrapper.GradleWrapperMain %*
86
75
87
76
:end
88
77
@ rem End local scope for the variables with windows NT shell
0 commit comments