欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

关于tomcat点击startup.bat后闪退问题的解决办法

程序员文章站 2022-04-06 22:39:48
问题:使用免安装的tomcat双击startup.bat后,启动窗口一闪而过,而且tomcat服务未启动。 原因:在启动tomcat是需要读取环境变量和配置信息,缺少了这...

问题:使用免安装的tomcat双击startup.bat后,启动窗口一闪而过,而且tomcat服务未启动。

原因:在启动tomcat是需要读取环境变量和配置信息,缺少了这些信息,就不能登记环境变量,导致了tomcat的闪退。

解决办法:

1.在已解压的tomcat的bin文件夹下找到startup.bat,右击->编辑。在文件头加入下面两行:

set java_home=d:\java\jdk1.6.0_10 (java jdk目录)
set tomcat_home=e:\tomcat-6.0.35 (解压后的tomcat文件目录)

2.同样的。在已解压的tomcat的bin文件夹下找到shutdown.bat,右击->编辑。在文件头加入下面两行:

set java_home=d:\java\jdk1.6.0_10 (java jdk目录)
set tomcat_home=e:\tomcat-6.0.35 (解压后的tomcat文件目录)
@echo off  
set java_home=c:\program files (x86)\java\jdk1.7.0_11  
set tomcat_home=d:\apache-tomcat-6.0.30  
rem licensed to the apache software foundation (asf) under one or more  
rem contributor license agreements. see the notice file distributed with  
rem this work for additional information regarding copyright ownership.  
rem the asf licenses this file to you under the apache license, version 2.0  
rem (the "license"); you may not use this file except in compliance with  
rem the license. you may obtain a copy of the license at  
rem  
rem   http://www.apache.org/licenses/license-2.0  
rem  
rem unless required by applicable law or agreed to in writing, software  
rem distributed under the license is distributed on an "as is" basis,  
rem without warranties or conditions of any kind, either express or implied.  
rem see the license for the specific language governing permissions and  

以上所述是小编给大家介绍的关于tomcat点击startup.bat后闪退问题的解决办法,希望对大家有所帮助