JConsole from JDK 6 supports dynamic attach capability, this means it is able to attach any running Java application which does not need to start with -Dcom.sun.management.jmxremote option. However, you may not able to attach a running Java process because of "The management agent is not enabled on this process" error. To solve this, just create a new temporary directory (e.g. C:\tmp) and points your TMP environment to there. (Control Panel -> System -> Advanced -> Environment Variables). Restart your Java application and now your JConsole should be able to attach it now. For more troubleshooting tip, you may read Daniel Fuchs Blogs and Sun Forum.

4 comments:
Your solution didn't work. The problem was the fact that i did pass the following parameter to the JVM:
-Dcom.sun.management.jmxremote
Thank you! I've been tearing out my hair for two hours trying to figure out why JConsole would not attach to Eclipse. Never would have suspected the TMP variable.
Worked! Thank you!
Excellent ! I searched for that issue for months. Thanks a lot !
Post a Comment