如何在Windows下使用特定的PATH安装tomcat?
我有以下代码:
tomcat5.exe //IS//%SERVICE_NAME% --StartPath "%BASE_DIR%\bin" --Jvm "%JAVA_HOME%\bin\%JAVA_MODE%\jvm.dll" --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams "-config;%CONFIG%;start" --StopParams stop --Startup auto
tomcat5.exe //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%#-Dcatalina.home=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Xrs#-Djava.library.path=%DLL_DIR%#-DimageservicePath=%imageservicePath%" --StartMode jvm --StopMode jvm
tomcat5.exe //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp"
tomcat5.exe //US//%SERVICE_NAME% --JvmMx %MEMORY% --JvmMs %MIN_MEMORY%
tomcat5.exe //US//%SERVICE_NAME% --Environment "PATH=.\;c:\path\bin"
我需要指定一个特殊的路径,因为一些本机代码加载问题。
我的问题是,服务安装程序将更改提供的路径: http://tomcat.apache.org/tomcat-5.5-doc /windows-service-howto.html
--环境
将按 key=value 形式提供给服务的环境变量列表。它们使用 # 或 ; 字符分隔
我需要指定具有两个位置的 Windows PATH:PATH=.;c:\path\bin
该路径将存储在注册表中:
PATH=.
c:\path\bin
它应该是:
PATH=.;c:\path\bin
它按照描述的方式工作,所以我想我错过了一些东西,但我没有找到任何有关如何设置路径并解决此问题的信息...
PS: 我知道我使用的是过时版本的 tomcat。
I have the following Code:
tomcat5.exe //IS//%SERVICE_NAME% --StartPath "%BASE_DIR%\bin" --Jvm "%JAVA_HOME%\bin\%JAVA_MODE%\jvm.dll" --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams "-config;%CONFIG%;start" --StopParams stop --Startup auto
tomcat5.exe //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%#-Dcatalina.home=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Xrs#-Djava.library.path=%DLL_DIR%#-DimageservicePath=%imageservicePath%" --StartMode jvm --StopMode jvm
tomcat5.exe //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp"
tomcat5.exe //US//%SERVICE_NAME% --JvmMx %MEMORY% --JvmMs %MIN_MEMORY%
tomcat5.exe //US//%SERVICE_NAME% --Environment "PATH=.\;c:\path\bin"
I need to specify a special PATH, because some native-code loading issues.
My problem is, that the service-installer will change provided PATH:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
--Environment
List of environment variables that will be provided to the service in the form key=value. They are separated using either # or ; characters
I need to specify a Windowes PATH with two locations: PATH=.;c:\path\bin
The path will be stored within the registry:
PATH=.
c:\path\bin
it should be:
PATH=.;c:\path\bin
It works as described, so I think I missed something, but I did not find anything about how to set the PATH and solve this issue...
PS:
I know I'm using an outdated version of tomcat.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,在我下载了源代码并弄清楚之后,使用了 apache-commons procrun deamon,我终于找到了解决方案。 tomcat 项目的文档不完整:
http://commons.apache.org/daemon/ procrun.html
最后一句得出解决方案:
Well, after I downloaded the source and figured out, that the apache-commons procrun deamon is used and I finally found the solution. The documentation at the tomcat project wasn't complete:
http://commons.apache.org/daemon/procrun.html
The last sentence lead to the solution: