简体   繁体   中英

Java Mission Control doesn't list any JVMs to connect to

I'm running on MacOS Sierra 10.12. Had to replace some jar file for the UI to work and now I don't see any JVM listed in the panel. Tried to follow https://community.oracle.com/thread/2579717 but nothing works.

I'm running on 1.8.0_192-b12. The jmc.ini file is in a different directory than the above, and when adding the path after -vm I actually get an error.

Not sure what is wrong, but probably something related to the attach mechanism,. Perhaps you are starting JMC using a JRE instead of a JDK, or your user doesn't have read/write access to the temp directory.

As a workaround, you can use Java Discovery Protocol (JDP) to make the JVM visible to JMC. Start your application with the following system properties (ignoring security)

$ java -Dcom.sun.management.jmxremote.port=7091 
 -Dcom.sun.management.jmxremote.rmi.port=7091
 -Dcom.sun.management.jmxremote.authenticate=false
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.autodiscovery=true  ...

Besides starting the management server, it will start a JDP server that will broadcast connection details that JMC will pick up in 5-10 seconds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM