tomcat java变量环境设置



绿色版tomcat 手动启动startup.bat的时候出现一闪而过的状态。解决方法,配置startup.bat文件

  1. @echo off
  2. SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_10 #这里
  3. SET CATALINA_HOME=D:\tomcat6035
  4. SET CATALINA_BASE=D:\tomcat6035
  5. rem Licensed to the Apache Software Foundation (ASF) under one or more
  6. rem contributor license agreements. See the NOTICE file distributed with
  7. rem this work for additional information regarding copyright ownership.
  8. rem The ASF licenses this file to You under the Apache License, Version 2.0
  9. rem (the "License"); you may not use this file except in compliance with
  10. rem the License. You may obtain a copy of the License at
  11. rem
  12. rem http://www.apache.org/licenses/LICENSE-2.0
  13. rem
  14. rem Unless required by applicable law or agreed to in writing, software
  15. rem distributed under the License is distributed on an "AS IS" BASIS,
  16. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. rem See the License for the specific language governing permissions and
  18. rem limitations under the License.
  19. if "%OS%" == "Windows_NT" setlocal
  20. rem ---------------------------------------------------------------------------
  21. rem Start script for the CATALINA Server
  22. rem
  23. rem $Id: startup.bat 908749 2010-02-10 23:26:42Z markt $
  24. rem ---------------------------------------------------------------------------
  25. rem Guess CATALINA_HOME if not defined
  26. set "CURRENT_DIR=%cd%"
  27. if not "%CATALINA_HOME%" == "" goto gotHome
  28. set "CATALINA_HOME=%CURRENT_DIR%"
  29. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  30. cd ..
  31. set "CATALINA_HOME=%cd%"
  32. cd "%CURRENT_DIR%"
  33. :gotHome
  34. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  35. echo The CATALINA_HOME environment variable is not defined correctly
  36. echo This environment variable is needed to run this program
  37. goto end
  38. :okHome
  39. set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
  40. rem Check that target executable exists
  41. if exist "%EXECUTABLE%" goto okExec
  42. echo Cannot find "%EXECUTABLE%"
  43. echo This file is needed to run this program
  44. goto end
  45. :okExec
  46. rem Get remaining unshifted command line arguments and save them in the
  47. set CMD_LINE_ARGS=
  48. :setArgs
  49. if ""%1""=="""" goto doneSetArgs
  50. set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
  51. shift
  52. goto setArgs
  53. :doneSetArgs
  54. call "%EXECUTABLE%" start %CMD_LINE_ARGS%
  55. :end

posted on 2017-03-23 09:33  signheart  阅读(451)  评论(0编辑  收藏  举报

导航