作为服务运行时,将JVM参数传递给Tomcat? [英] Passing JVM arguments to Tomcat when running as a service?

查看:225
本文介绍了作为服务运行时,将JVM参数传递给Tomcat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将几个JVM参数传递给Tomcat正在运行的JVM,以便我的应用程序可以接收它们。



我想遵循进程概述了在本文中选择环境变量。



更新
对不起,这是在Windows下运行(我的开发机器上有7个2003在客户端服务器上)

解决方案

您需要编辑Windows服务。有三种方法可以这样做:


  1. 开始 Tomcat5w code> // MS // ServiceName 在系统托盘中获取一个图标,可以快速访问服务的配置。


  2. 在控制面板中打开服务管理器。 Tomcat有一个条目。


在编辑器中,有一个选项卡可以添加其他JVM参数。



第三种方式(我更喜欢)是编写一个为你编辑配置的脚本。这样,您可以将配置保存在某个位置进行备份。请参阅文档如何执行(提示:使用 tomcat5 // US //...


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.

How would I go about doing this?

UPDATE Sorry This is running under windows (7 on my Dev machine 2003 on client server)

解决方案

You need to edit the Windows service. There are three ways to do this:

  1. Start Tomcat5w with //MS//ServiceName to get an icon in the system tray which gives you a quick access to the configuration of the service.

  2. Open the service manager in the "Control Panel". There is an entry for Tomcat.

In the editor, there is a tab where you can add additional JVM parameters.

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆