tool-wrapper.bat 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @echo off
  2. if "%OS%" == "Windows_NT" setlocal
  3. rem ---------------------------------------------------------------------------
  4. rem Wrapper script for command line tools
  5. rem
  6. rem Environment Variable Prequisites
  7. rem
  8. rem CATALINA_HOME May point at your Catalina "build" directory.
  9. rem
  10. rem TOOL_OPTS (Optional) Java runtime options used when the "start",
  11. rem "stop", or "run" command is executed.
  12. rem
  13. rem JAVA_HOME Must point at your Java Development Kit installation.
  14. rem
  15. rem JAVA_OPTS (Optional) Java runtime options used when the "start",
  16. rem "stop", or "run" command is executed.
  17. rem
  18. rem $Id: tool-wrapper.bat,v 1.4 2004/03/01 16:00:53 remm Exp $
  19. rem ---------------------------------------------------------------------------
  20. rem Guess CATALINA_HOME if not defined
  21. if not "%CATALINA_HOME%" == "" goto gotHome
  22. set CATALINA_HOME=.
  23. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  24. set CATALINA_HOME=..
  25. :gotHome
  26. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  27. echo The CATALINA_HOME environment variable is not defined correctly
  28. echo This environment variable is needed to run this program
  29. goto end
  30. :okHome
  31. rem Get standard environment variables
  32. if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
  33. rem Get standard Java environment variables
  34. if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
  35. echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
  36. echo This file is needed to run this program
  37. goto end
  38. :okSetclasspath
  39. set BASEDIR=%CATALINA_HOME%
  40. call "%CATALINA_HOME%\bin\setclasspath.bat"
  41. rem Add on extra jar files to CLASSPATH
  42. set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\common\lib\jmx.jar
  43. rem Get remaining unshifted command line arguments and save them in the
  44. set CMD_LINE_ARGS=
  45. :setArgs
  46. if ""%1""=="""" goto doneSetArgs
  47. set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  48. shift
  49. goto setArgs
  50. :doneSetArgs
  51. %_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
  52. :end