gradlew.bat 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @rem
  2. @rem Copyright 2015 the original author or authors.
  3. @rem
  4. @rem Licensed under the Apache License, Version 2.0 (the "License");
  5. @rem you may not use this file except in compliance with the License.
  6. @rem You may obtain a copy of the License at
  7. @rem
  8. @rem https://www.apache.org/licenses/LICENSE-2.0
  9. @rem
  10. @rem Unless required by applicable law or agreed to in writing, software
  11. @rem distributed under the License is distributed on an "AS IS" BASIS,
  12. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. @rem See the License for the specific language governing permissions and
  14. @rem limitations under the License.
  15. @rem
  16. @if "%DEBUG%" == "" @echo off
  17. @rem ##########################################################################
  18. @rem
  19. @rem Gradle startup script for Windows
  20. @rem
  21. @rem ##########################################################################
  22. @rem Set local scope for the variables with windows NT shell
  23. if "%OS%"=="Windows_NT" setlocal
  24. set DIRNAME=%~dp0
  25. if "%DIRNAME%" == "" set DIRNAME=.
  26. set APP_BASE_NAME=%~n0
  27. set APP_HOME=%DIRNAME%
  28. for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
  29. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
  30. if defined JAVA_HOME goto findJavaFromJavaHome
  31. set JAVA_EXE=java.exe
  32. %JAVA_EXE% -version >NUL 2>&1
  33. if "%ERRORLEVEL%" == "0" goto execute
  34. echo.
  35. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  36. echo.
  37. echo Please set the JAVA_HOME variable in your environment to match the
  38. echo location of your Java installation.
  39. goto fail
  40. :findJavaFromJavaHome
  41. set JAVA_HOME=%JAVA_HOME:"=%
  42. set JAVA_EXE=%JAVA_HOME%/bin/java.exe
  43. if exist "%JAVA_EXE%" goto execute
  44. echo.
  45. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  46. echo.
  47. echo Please set the JAVA_HOME variable in your environment to match the
  48. echo location of your Java installation.
  49. goto fail
  50. :execute
  51. set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
  52. "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
  53. :end
  54. if "%ERRORLEVEL%"=="0" goto mainEnd
  55. :fail
  56. if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
  57. exit /b 1
  58. :mainEnd
  59. if "%OS%"=="Windows_NT" endlocal
  60. :omega