home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / tool-wrapper.bat < prev    next >
Encoding:
DOS Batch File  |  2004-08-28  |  2.1 KB  |  60 lines

  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.  
  21. rem Guess CATALINA_HOME if not defined
  22. if not "%CATALINA_HOME%" == "" goto gotHome
  23. set CATALINA_HOME=.
  24. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  25. set CATALINA_HOME=..
  26. :gotHome
  27. if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
  28. echo The CATALINA_HOME environment variable is not defined correctly
  29. echo This environment variable is needed to run this program
  30. goto end
  31. :okHome
  32.  
  33. rem Get standard environment variables
  34. if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
  35.  
  36. rem Get standard Java environment variables
  37. if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
  38. echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
  39. echo This file is needed to run this program
  40. goto end
  41. :okSetclasspath
  42. set BASEDIR=%CATALINA_HOME%
  43. call "%CATALINA_HOME%\bin\setclasspath.bat"
  44.  
  45. rem Add on extra jar files to CLASSPATH
  46. set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\common\lib\jmx.jar
  47.  
  48. rem Get remaining unshifted command line arguments and save them in the
  49. set CMD_LINE_ARGS=
  50. :setArgs
  51. if ""%1""=="""" goto doneSetArgs
  52. set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  53. shift
  54. goto setArgs
  55. :doneSetArgs
  56.  
  57. %_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%
  58.  
  59. :end
  60.