版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、本人多次碰到这个问题,在网上搜索很久,一直没有找到真正的解决方 法。今天下午一次偶然的机会发现了问题所在,根据问题,提出以下解决方 案。问题所在:现在很多人都在使用 jdk 的压缩版,使得 tomcat 服务不能正确设置 java VM,导致tomcat服务不能正常配置和启动。如果你是安装版jdk也出现启动问题,请参照以下方法解决。假设jdk 安装目录为 d:j2sdktomcat5 安装目录为 D:Program FilesApache Software FoundationTomcat5.01. 配置环境变量:JAVA_HOME = d:j2sdkCLASSPATH= %JAVA_HOME
2、%bin;.;%JAVA_HOME%lib;%JAVA_HOME%libdt.jar;%JAVA_H OME%libtools.jarCATALINA_HOME = D:Program FilesApache Software FoundationTomcat 5.02. 配置Tomcat服务这里有两种情况,一是 tomcat5 为安装版,二是解压版,针对这两种情况 分别解决。( 1)安装版 tomcat5在安装时选择安装 tomcat 服务,如图安装完成后,打开注册表regedit.exe,找到HKEY_LOCAL_MACHINESOFTWAREApache Software Foundat
3、ionTomcat ServiceManager'Tomcat5Parameters,你可以看到里面有很多参数值,主要是修 改Java项的值为d:j2sdkjrebinserverjvm.dll,修改正确后,你就可以通过开始 ->程序->Apache Tomcat 5.0->start tomcat启动服务了。若没有若没有此项,可以 依照以下方法设置参数。( 2)解压版 tomcat5这时你要先配置服务所用的参数,启动命令是 tomcat5 的 bin 目录下的 tomcatw.exe(后面附上 tomcatw.exe 命令参数)。如果不存在 HKEY_LOCAL_M
4、ACHINESOFTWAREApache SoftwareFoun dati on TomcatServiceMa nagerTomcat5Parameters,请先仓 U建,这一步 是关键。使用命令 tomcatw.exe /ES/Tomcat5 打开配置窗口,如下设置参数如下:Service 栏Description = Apache Tomcat 5.0(这个可以随便写)Image Path = d:Program FilesApache Software FoundationTomcat5.0binbootstrap.jarWork Path = d:Program FilesApac
5、he Software FoundationTomcat 5.0AutoStart 这个参数允许设置服务为自动启动Java VM 栏:Auto 不要打勾Java VM = D:j2sdkjrebinserverjvm.dllJava Options = -Dcatalina.home="d:Program FilesApache SoftwareFoundationTomcat 5.0"-Djava.endorsed.dirs="d:Program FilesApache SoftwareFoundationTomcat 5.0commonendorsed&quo
6、t; -XrsStart Class = org/apache/catalina/startup/Bootstrap;main;startStop Class = org/apache/catalina/startup/Bootstrap;main;stopStandard Streams:只要设置两项Output = d:Program FilesApache Software FoundationTomcat5.0logsstdout.logError = d:Program FilesApache Software FoundationTomcat5.0logsstderr.log根据以
7、上设置,接下来可以使用 tomcatw.exe /GT/Tomcat5 启动服务了。 若有问题可以给我留言或者加我 QQ: 4034348T0MCAT5在 WINDOWS下的一些命令行Tomcatw monitor applicationTomcatwis a GUI application for monitoring and configuring Tomcatservices.The available command line options are:Edit service/ES/configurationThis is the default operation. It is ca
8、lled ifthe no option is provided but the executable isrenamed toservicenameW.exe/MS/Monitor servicePut the icon in the system tryCommand line argumentsEach command line directive is in the form of/XX/ServiceNameThe available command line options are:This is the default operation. It is called ifRunt
9、heserviceasthenooptionisprovided.TheServiceNameisthe/TS/consolename of the executable without exe sufix,applicationmeaning Tomcat5/RS/Run the serviceCalled only from ServiceManager/SS/Stop the serviceUpdate service/US/parameters/IS/Install service/DS/Delete serviceStops the service if runningCommand
10、 line parametersEachcommandparameterisprefixedwith- -.Ifthecommandlineisprefixedwith+then it's value will be appended to the existing option. If theenvironment variable with the same name as command line parameter butprefixed withPR_exists it will take precedence. For example:set PR_CLASSPATH=xx
11、.jaris equivalent to providing-Classpath=xx.jaras command line parameter.ParameterNameDefault-Description-DisplayNameServiceName-Installprocrun.exe/RS/ServiceName-Startupmanual-DependsOn-Environment-User-Password-JavaHomeJAVA_HOME-JvmautoDescriptionServicenamedescription(maximum1024characters)Servic
12、e display nameInstall imageServicestartupmodecanbeeitherautoormanualList of services that this servicedepend on. Dependent services areseparated using either#or;charactersList of environment variables thatwillbeprovidedtotheserviceintheformkey=value. They are separatedusing either#or;charactersUser
13、account used for runningexecutable. It is used only forStartModejavaorexeand enablesrunning applications as service underaccount without LogonAsServiceprivilege.Passwordforuseraccountsetby-UserparameterSetadifferentJAVA_HOMEthendefinedby JAVA_HOME environment variableUse eitherautoor specify the ful
14、lpath to thejvm.dll. You can use theenvironment variable expansion here.-JvmOptions-Xrs-Classpath-JvmMs-JvmMx-JvmSs-StartImage-StartPath-StartClass-StartParams-StartMethodMain-StartModeexecutable-StopImage-StopPath-StopClass-StopParams-StopMethodMain-StopModeexecutable-StopTimeoutNo Timeout-LogPathw
15、orking path-LogPrefixjakarta_service-LogLevelINFO-StdOutput-StdErrorListofoptionsintheformof-Dor-Xthat will be passed to the JVM. Theoptions are separated using either#or;characters.Set the Java classpathInitial memory pool size in MBMaximum memory pool size in MBThread stack size in KBExecutable th
16、at will be run.Working path for the start imageexecutable.Class that will be used for startup.Listofparametersthatwillbepassedto either StartImage or StartClass.Parameters are separated using either#or;character.Method name if differs then mainCan one ofjvmjavaorexeExecutable that will be run on Sto
17、pservice signal.Working path for the stop imageexecutable.ClassthatwillbeusedonStopservicesignal.Listofparametersthatwillbepassedto either StopImage or StopClass.Parameters are separated using either#or;character.Method name if differs then mainCan one ofjvmjavaorexeDefines the timeout in seconds th
18、atprocrun waits for service to exitgracefully.Defines the path for loggingDefines the service log filenameDefines the logging level and can beeithererror,info,warnordebugRedirected stdout filenameRedirected stderr filenameInstalling servicesThe safest way to manually install the service is to use th
19、e providedservice.batscript.Install the service named 'Tomcat5'C:> service.bat installIf using tomcat.exe, you need to use the/IS/parameter.Install the service named 'Tomcat5'C:> tomcat5 /IS/Tomcat5 -DisplayName="Apache Tomcat 5" C:> - Install="C:Program Files
20、Tomcatbintomcat5.exe" -Jvm=auto C:> - StartMode=jvm -StopMode=jvm C:> -StartClass=org.apache.catalina.startup.Bootstrap-StartParams=start C:> -StopClass=org.apache.catalina.startup.Bootstrap-StopParams=stopUpdating servicesTo update the service parameters, you need to use the/US/parame
21、ter.Update the service named 'Tomcat5C:> tomcat /US/Tomcat5 -Description="Apache Tomcat Server - /tomcat " C:> -Startup=autoClasspath=%JAVA_HOME%libtools.jar;%CATALINA_HOME%binbootstrap.jarRemoving servicesTo remove the service, you need to use the/DS/parameter.If the service is running it will be stopped and then deleted.Remove the service named 'Tomcat5'C:> tomcat /DS/Tomcat5Debugging servicesToruntheserviceinconsolemode,youneedtousethe/TS/parameter.Theservicesh utdowncanbeinitiatedbypressingCTRL+CorCTRL+BRE
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 三年级英语译林版Unit 2 Whats your name?Lead in教学设计
- 2024年重庆市消防设施操作员《中级技能-维保方向》科目真题冲刺卷9月份B卷
- 大健康产业园市场运营现状及投资风险展望报告模板
- 施工方案-图文
- 人教版小学数学暑假三年级下册口算卡全套
- (中考复习)诗中有画绘之有法(2022.6.16)
- 全球医疗设备市场分析:北美是全球最大的市场市场份额接近40%
- 江苏省盐城市八校2024-2025学年高三上学期开学考试数学试题(原卷版)
- 写景无忧:小学生作文素材宝库(素材)2023-2024学年统编版语文六年级下册
- 记账实操-海绵店的账务处理分录
- 医保培训课件
- JT-T-1247-2019综合客运枢纽导向系统布设规范
- 2024年农业农村知识考试必背复习题库(浓缩500题)
- 六年级上册英语Unit 4 Lesson 24 Maddys Christmas 冀教版(三起)
- Lesson16 How do you go to school(教案)2023-2024学年英语四年级下册
- 浙江省教育考试院2024年高考仿真模拟化学试卷含解析
- 2023初三一模闵行英语卷+答案
- 2024年4月自考03709马克思主义基本原理概论试题及答案含解析含页码
- 《通风管道技术规程+JGJT+141-2017》详细解读
- 五年高考高考英语真题分项详解 专题20 情景交际和特殊句式(含解析)-人教高三全册英语试题
- 企业首席质量官培训
评论
0/150
提交评论