无法将JCSsole与作为Windows服务运行的Tomcat一起使用

Kee*_*ter 21 java tomcat jmx jconsole

我正在运行tomcat 6.0.18作为Windows服务.在服务小程序中,jvm配置为默认值,即它使用JRE的jvm.dll.

我试图用JConsole监视此应用程序,但无法在本地连接到它.我添加了参数-Dcom.sun.management.jmxremote(在使用start.bat脚本启动tomcat时有效).但是jvm似乎没有拿起参数.

Ed *_*mas 30

有一个很好的GUI来编辑选项,不需要在注册表中捣乱.

打开C:\ Program Files\Apache Software Foundation\Tomcat 6.0\bin\tomcat6.exe(或者只需双击任务栏中的监视器图标).转到Java窗格,将以下内容添加到参数列表中,然后重新启动Tomcat.

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8086
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

然后,您可以连接JConsole或更新的VisualVM.