Passing JVM arguments to Tomcat when running as a service?(作为服务运行时将JVM参数传递给Tomcat?)
问题描述
我需要将几个 JVM 参数传递给运行 Tomcat 的 JVM,以便我的应用程序可以获取它们.
I need to pass a couple of JVM arguments to the JVM which Tomcat is running in so that my application can pick them up.
我想按照本文中概述的获取环境变量的过程.
I want to follow the process outlined in this article to pick up environment variables.
我该怎么做呢?
更新抱歉,这是在 windows 下运行的(客户端服务器上我的 Dev machine 2003 上的 7)
UPDATE Sorry This is running under windows (7 on my Dev machine 2003 on client server)
推荐答案
您需要编辑 Windows 服务.有三种方法可以做到这一点:
You need to edit the Windows service. There are three ways to do this:
使用
//MS//ServiceName 启动Tomcat5w以在系统托盘中获取一个图标,以便您快速访问到服务的配置.
Start
Tomcat5wwith//MS//ServiceName to get an icon in the system tray which gives you a quick access to the configuration of the service.
在控制面板"中打开服务管理器.Tomcat 有一个条目.
Open the service manager in the "Control Panel". There is an entry for Tomcat.
在编辑器中有一个选项卡,您可以在其中添加其他 JVM 参数.
In the editor, there is a tab where you can add additional JVM parameters.
第三种方式(我更喜欢)是编写一个脚本来为您编辑配置.这样,您可以将配置保存在某处以进行备份.请参阅 文档如何做到这一点(提示:使用 tomcat5//美国//...)
The third way (which I prefer) is to write a script which edits the config for you. This way, you can save the config somewhere for backup. See the docs how to do that (Hint: use tomcat5 //US//...)
这篇关于作为服务运行时将JVM参数传递给Tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:作为服务运行时将JVM参数传递给Tomcat?
基础教程推荐
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- RabbitMQ:消息保持“未确认"; 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- Struts2 URL 无法访问 2022-01-01
