How to monitor a Java program using Jconsole?
问题 I have written a program to print number from 1 to 200 using 2 threads. Now I want to monitor this program using JConsole. Basically I want to learn how to use JConsole for monitoring an application. I searched google but couldn't find something useful. How I can achieve this? When I started jconsole.exe in bin folder. It asks for hostname and port number. Here in my case, there is none, I guess. Can somebody guide. 回答1: You need to enable JMX by adding the following JVM arguments : -Dcom.sun