3

我正在尝试通过命令提示符启动 tomcat 服务器,但未CATALINE_HOME设置其显示变量。我已经通过控制面板设置了变量,然后同样的错误也来了。

如果我直接转到starttup.bat文件并尝试运行它,它只会闪烁并消失。所以我尝试在最后添加暂停命令,然后当我运行时我得到

using CATALINA _BASE :"C:\apache-tomcat-7.0.26"
using CATALINA _HOME:"C:\apache-tomcat-7.0.26"
using CATALINA _TMPDIR :"C:\apache-tomcat-7.0.26\temp"
using JRE_HOME :"C:\programfiles\java\jre"
using CLASSPATH :"C:\apache-tomcat-7.0.26\bin\bootstrap.jar;"C:\apache-tomcat-7.0.26\bin\tomcat-juli.jar

这是最近的目录内容。

    ... 17 more
Dec 12, 2012 3:59:17 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 445 ms
Dec 12, 2012 3:59:17 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 12, 2012 3:59:17 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\docs
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\examples
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\host-manager
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\manager
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.26\webapps\ROOT
Dec 12, 2012 3:59:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 3:59:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 468 ms
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 4:01:06 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Dec 12, 2012 4:01:06 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
4

3 回答 3

0

您必须先定义两个变量

  1. Java_首页
  2. CATALINA_HOME

以下是您可以在此处使用的 bat 文件%TOMCAT_LOC%= 您的 tomcat 路径(请不要包含 bin)

echo Stopping Tomcat App Server
cd /D %TOMCAT_LOC%
set JAVA_HOME=C:\Program Files\jdk echo java Path
set CATALINA_HOME=%TOMCAT_LOC%
call %TOMCAT_LOC%\bin\shutdown.bat
echo Stopped Tomcat 
于 2014-02-28T07:26:52.217 回答
0

这可能是因为该进程已经在后台运行。shutdown.bat如有必要,请致电停止。

否则,您应该能够在 访问该经理http://localhost:8080/html/manager。在此之前,您可能需要先配置用户/密码,然后重新启动 tomcat。

请参阅tomcat 文档以了解更多信息。

于 2012-12-12T10:04:19.087 回答
-1

您可以移动到包含批处理文件(tomcat/bin)的路径,然后运行批处理文件

C:\用户>cd C:\apache-tomcat-6.0.35\bin

C:\apache-tomcat-6.0.35\bin>startup.bat

于 2014-08-13T18:57:04.880 回答