问题描述
限时送ChatGPT账号..我已经通过startup.bat运行Tomcat 6.0.37服务器很长一段时间了.现在我想将tomcat作为机器启动时自动启动的服务运行.
I have been running a Tomcat 6.0.37 server for quite some time via the startup.bat.Now I want to run tomcat as a service that starts automatically when the machine starts up.
我使用 bat 创建了服务:service.bat install.这成功地创建了服务.尝试启动它时,我收到标题中的错误.然后我尝试只运行 exe(tomcat6.exe).这个给了我完全相同的错误.
I created the service with the bat : service.bat install.This created the service succesfully.When trying to start it however I get the error in the title.I then tried running just the exe(tomcat6.exe).This gave me the exact same error.
我已经检查过 CATALINA_HOME、JAVA_HOME 和 JRE_HOME 设置是否正确.bootstrap.jar 确实存在于 tomcat/bin 中.jvm 的路径是正确的.jvm.dll 确实存在于 jre6/bin/server 中.
I have checked that CATALINA_HOME,JAVA_HOME and JRE_HOME is set correctly.bootstrap.jar does exist in tomcat/bin.Path to the jvm is correct.jvm.dll does exist in jre6/bin/server.
我还发现了一个缺少不同类的线程,他们说 jre 中缺少 rt.jar,我检查了这个,我的存在于 jre6/lib/中.我真的不知道可以是什么了错了.
I also found a thread with a different class missing where they said rt.jar was missing from the jre,I checked this and mine exists in jre6/lib/.I really don't have anymore ideas as to what can be wrong.
推荐答案
尝试通过执行(适应您的路径)来更新服务:
try to update the service by executing (adapt to your path):
C:\> tomcat6 //US//Tomcat6 --Description="Apache Tomcat Server - http://tomcat.apache/ " \
C:\> --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar
美国的意思是:更新服务.
这应该修复类路径.
US means: update service.
This should fix the classpath.
所有必要信息都在官网:
http://tomcat.apache/tomcat-6.0-doc/windows-service-howto.html
All the necessary information are in the official website:
http://tomcat.apache/tomcat-6.0-doc/windows-service-howto.html
这篇关于NoClassDefFoundError: org/apache/catalina/startup/Bootstrap 从 exe/as 服务运行 tomcat 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论