Skip to content

Commit ec5acfd

Browse files
Updated customWindowsStartScript.txt to latest version
1 parent d5bd90a commit ec5acfd

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

‎src/main/resources/customWindowsStartScript.txt‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@rem from https://github.com/gradle/gradle/blob/41203b0be36cabf983b0ebe9e402e1f37a67b0cc/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/windowsStartScript.txt
1+
@rem from https://github.com/gradle/gradle/blob/fc7a4c9710a3df2c33a439fff4799bce057d89f9/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/windowsStartScript.txt
22

33
@rem
44
@rem Copyright 2015 the original author or authors.
@@ -51,27 +51,29 @@ set JAVA_EXE=java.exe
5151
%JAVA_EXE% -version >NUL 2>&1
5252
if %ERRORLEVEL% equ 0 goto execute
5353

54-
echo. 1>&2
55-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
56-
echo. 1>&2
57-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
58-
echo location of your Java installation. 1>&2
54+
1>&2 echo.
55+
1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
56+
1>&2 echo.
57+
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
58+
1>&2 echo location of your Java installation.
5959

6060
"%COMSPEC%" /c exit 1
61+
goto exitWithErrorLevel
6162

6263
:findJavaFromJavaHome
6364
set JAVA_HOME=%JAVA_HOME:"=%
6465
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
6566

6667
if exist "%JAVA_EXE%" goto execute
6768

68-
echo. 1>&2
69-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
70-
echo. 1>&2
71-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
72-
echo location of your Java installation. 1>&2
69+
1>&2 echo.
70+
1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
71+
1>&2 echo.
72+
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
73+
1>&2 echo location of your Java installation.
7374

7475
"%COMSPEC%" /c exit 1
76+
goto exitWithErrorLevel
7577

7678
:execute
7779
@rem Setup the command line
@@ -84,8 +86,9 @@ set CLASSPATH=$classpath
8486
@rem Execute ${applicationName}
8587
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
8688
@rem which allows us to clear the local environment before executing the java command
87-
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %><% if ( classpath ) {%> -classpath "%CLASSPATH%"<% } %> <% if ( mainClassName.startsWith('--module ') ) { %>--module-path "%MODULE_PATH%" <% } %>${mainClassName ?: entryPointArgs} %* & call :exitWithErrorLevel
89+
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %${optsEnvironmentVar}% <% if ( appNameSystemProperty ) { %>"-D${appNameSystemProperty}=%APP_BASE_NAME%"<% } %><% if ( classpath ) {%> -classpath "%CLASSPATH%"<% } %> <% if ( mainClassName.startsWith('--module ') ) { %>--module-path "%MODULE_PATH%" <% } %>${mainClassName ?: entryPointArgs} %* & call :exitWithErrorLevel & goto exitWithErrorLevel
8890

91+
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
8992
:exitWithErrorLevel
9093
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
9194
"%COMSPEC%" /c exit %ERRORLEVEL%

0 commit comments

Comments
 (0)