Connecting JConsole to a Java process: the missing -D option
Once in a while I tend to use JConsole for basic profiling of a Java process.
Somehow I always forget which flag I need to set to enable remote connections to a process. And yes, I know the option is hidden somewhere on page 3 of the documentation…
You need to add the following in the VM arguments:
-Dcom.sun.management.jmxremote
After which you can just connect JConcole to the pid of the process you’re interested in.
No commentsNo comments yet. Be the first.
Leave a reply