after writing the demo program in MyEclipse, open Jconsole found in the local process list found only jconsole itself, there is no expected MyEclipse process and demo process.
search for "Jconsole local connection Failed" most of the answers given are:
at Run configurations ... The following operating parameters are added to the
-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=8011-dcom.sun.management.jmxremote.ssl= False-dcom.sun.management.jmxremote.authenticate=false
then use jconsole remote connection "localhost:8011", method is feasible
But the reason:
On the Win32 system, each Java process starts after the%tmp%/hsperfdata_ User ( User for the current logged-on user name), create a file with the Java process PID as the filename to record some information about the Java process. These files are used by Jconsole and JPS to obtain information about the Java process in the current system.
on the cmd command line, enter set TMP to display the temp directory as "tmp=c:\users\ my user name \appdata\local\temp" while printing in a Java program system.getproperty ("java. Io.tmpdir") is displayed as "C:\Windows\Temp",
Run the demo program to find the newly created Vmid file in the "C:\Windows\Temp\hsperfdata_ my username". Copy this file to "C:\Users\ my user name \appdata\local\temp\hsperfdata_ My user name ", You can see the local demo process when you open jconsole.
Workaround for Jconsole local connection failure under Windows