版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、本人多次碰到这个问题,在网上搜索很久,一直没有找到真正的解决方法。今天下午一次偶然的机会发现了问题所在,根据问题,提出以下解决方案。问题所在:现在很多人都在使用jdk的压缩版,使得tomcat服务不能正确设置java VM,导致tomcat服务不能正常配置和启动。如果你是安装版jdk也出现启动问题,请参照以下方法解决。假设 jdk 安装目录为 d:j2sdktomcat5 安装目录为 D:Program FilesApache Software FoundationTomcat 5.01. 配置环境变量:JAVA_HOME = d:j2sdkCLASSPATH = %JAVA_HOME%bin
2、;.;%JAVA_HOME%lib;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jarCATALINA_HOME = D:Program FilesApache Software FoundationTomcat 5.02. 配置 Tomcat 服务这里有两种情况,一是tomcat5为安装版,二是解压版,针对这两种情况分别解决。(1)安装版 tomcat5在安装时选择安装tomcat服务,如图安装完成后,打开注册表regedit.exe, 找到HKEY_LOCAL_MACHINESOFTWAREApache Software FoundationTomca
3、t Service ManagerTomcat5Parameters,你可以看到里面有很多参数值,主要是修改Java项的值为 d:j2sdkjrebinserverjvm.dll, 修改正确后,你就可以通过开始-程序-Apache Tomcat 5.0-start tomcat启动服务了。若没有若没有此项,可以依照以下方法设置参数。(2)解压版 tomcat5这时你要先配置服务所用的参数,启动命令是 tomcat5的bin目录下的tomcatw.exe(后面附上tomcatw.exe命令参数)。如果不存在HKEY_LOCAL_MACHINESOFTWAREApache Software Fou
4、ndationTomcat Service ManagerTomcat5Parameters,请先创建,这一步是关键。使用命令 tomcatw.exe /ES/Tomcat5 打开配置窗口,如下 设置参数如下:Service栏 Description = Apache Tomcat 5.0 (这个可以随便写) Image Path = d:Program FilesApache Software FoundationTomcat 5.0binbootstrap.jar Work Path = d:Program FilesApache Software FoundationTomcat 5.0
5、 Auto Start 这个参数允许设置服务为自动启动Java VM栏: Auto 不要打勾 Java VM = D:j2sdkjrebinserverjvm.dll Java Options = -Dcatalina.home=d:Program FilesApache Software FoundationTomcat 5.0-Djava.endorsed.dirs=d:Program FilesApache Software FoundationTomcat 5.0commonendorsed -Xrs Start Class = org/apache/catalina/startup/
6、Bootstrap;main;start Stop Class = org/apache/catalina/startup/Bootstrap;main;stopStandard Streams: 只要设置两项 Output = d:Program FilesApache Software FoundationTomcat 5.0logsstdout.log Error = d:Program FilesApache Software FoundationTomcat 5.0logsstderr.log根据以上设置,接下来可以使用 tomcatw.exe /GT/Tomcat5 启动服务了。若
7、有问题可以给我留言或者加我QQ: 4034348 HYPERLINK /dankes/archive/2005/08/10/450043.aspx TOMCAT5在WINDOWS下的一些命令行Tomcatw monitor applicationTomcatw is a GUI application for monitoring and configuring Tomcat services.The available command line options are:/ES/Edit service configurationThis is the default operation. I
8、t is called if the no option is provided but the executable is renamed to servicenameW.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:/TS/Run the service as console applicat
9、ionThis is the default operation. It is called if the no option is provided. The ServiceName is the name of the executable without exe sufix, meaning Tomcat5/RS/Run the serviceCalled only from ServiceManager/SS/Stop the service/US/Update service parameters/IS/Install service/DS/Delete serviceStops t
10、he service if runningCommand line parametersEach command parameter is prefixed with -. If the command line is prefixed with + then its value will be appended to the existing option. If the environment variable with the same name as command line parameter but prefixed with PR_ exists it will take pre
11、cedence. For example:set PR_CLASSPATH=xx.jaris equivalent to providing-Classpath=xx.jaras command line parameter.ParameterNameDefaultDescription-DescriptionService name description (maximum 1024 characters)-DisplayNameServiceNameService display name-Installprocrun.exe /RS/ServiceNameInstall image-St
12、artupmanualService startup mode can be either auto or manual-DependsOnList of services that this service depend on. Dependent services are separated using either # or ; characters-EnvironmentList of environment variables that will be provided to the service in the form key=value. They are separated
13、using either # or ; characters-UserUser account used for running executable. It is used only for StartMode java or exe and enables running applications as service under account without LogonAsService privilege.-PasswordPassword for user account set by -User parameter-JavaHomeJAVA_HOMESet a different
14、 JAVA_HOME then defined by JAVA_HOME environment variable-JvmautoUse either auto or specify the full path to the jvm.dll. You can use the environment variable expansion here.-JvmOptions-XrsList of options in the form of -D or -X that will be passed to the JVM. The options are separated using either
15、# or ; characters.-ClasspathSet the Java classpath-JvmMsInitial memory pool size in MB-JvmMxMaximum memory pool size in MB-JvmSsThread stack size in KB-StartImageExecutable that will be run.-StartPathWorking path for the start image executable.-StartClassClass that will be used for startup.-StartPar
16、amsList of parameters that will be passed to either StartImage or StartClass. Parameters are separated using either # or ; character.-StartMethodMainMethod name if differs then main-StartModeexecutableCan one of jvmjava or exe-StopImageExecutable that will be run on Stop service signal.-StopPathWork
17、ing path for the stop image executable.-StopClassClass that will be used on Stop service signal.-StopParamsList of parameters that will be passed to either StopImage or StopClass. Parameters are separated using either # or ; character.-StopMethodMainMethod name if differs then main-StopModeexecutabl
18、eCan one of jvmjava or exe-StopTimeoutNo TimeoutDefines the timeout in seconds that procrun waits for service to exit gracefully.-LogPathworking pathDefines the path for logging-LogPrefixjakarta_serviceDefines the service log filename-LogLevelINFODefines the logging level and can be either error, in
19、fo, warn or debug-StdOutputRedirected stdout filename-StdErrorRedirected stderr filenameInstalling servicesThe safest way to manually install the service is to use the provided service.bat script.Install the service named Tomcat5C: service.bat installIf using tomcat.exe, you need to use the /IS/ par
20、ameter.Install the service named Tomcat5C: tomcat5 /IS/Tomcat5 -DisplayName=Apache Tomcat 5 C: -Install=C:Program FilesTomcatbintomcat5.exe -Jvm=auto C: -StartMode=jvm -StopMode=jvm C: -StartClass=org.apache.catalina.startup.Bootstrap -StartParams=start C: -StopClass=org.apache.catalina.startup.Boot
21、strap -StopParams=stopUpdating servicesTo update the service parameters, you need to use the /US/ parameter.Update the service named Tomcat5C: tomcat /US/Tomcat5 -Description=Apache Tomcat Server - /tomcat C: -Startup=auto -Classpath=%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 Tomcat5C: tomcat /DS/Tomcat5Debugging servicesTo run the service in console mode, you need to use the /TS/ parameter. The
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 铁路线路工技能考试:高级线路工考试试题
- 2024-2029年钻井软管行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 2024-2029年金刚石圆孔锯行业市场现状供需分析及市场深度研究发展前景及规划投资研究报告
- 2024-2029年酿酒设备市场前景分析及投资策略与风险管理研究报告
- 2024-2029年酒店行业市场发展分析及发展趋势前景预测报告
- 2024-2029年透明文胸油漆保护膜行业市场现状供需分析及市场深度研究发展前景及规划投资研究报告
- 2024-2029年远程塔台行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 2024-2029年过滤纸行业市场发展分析及前景趋势与投资战略研究报告
- 2024-2029年软光学玻璃行业市场现状供需分析及市场深度研究发展前景及规划投资研究报告
- 2024-2029年身体紧肤霜行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 投资担保协议书范本
- 叉车安全教育-课件PPT
- 全自动洗衣机控制系统设计
- 电子血压的设计、完整论文及详细电路
- 废气吸收调试方案
- 篮球胯下运球教案
- 排水板堆载预压排水固结法施工方案
- 政府会计制度PPT课件
- 2021年工程咨询行业发展及经营计划分析报告
- 北邮2014年通信原理硬件实验报告
- 沥青路面技术交底.doc
评论
0/150
提交评论