VisualVM “not supported for this JVM” on all local applications?

前端 未结 14 2321
故里飘歌
故里飘歌 2020-12-16 09:05

I have already spent a long time to load and test my application, now I need to profile it. But unluckily, the VisualVM always says \"not supported for this JVM\" on my loca

14条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 09:30

    In my case, even with the JVMs matching (both 64-Bit), the only way to get things working was sending the argument -Dcom.sun.management.jmxremote to the JVM to be monitored. That also works if you are having problems to connect via Java Mission Control (JMC).

    According to JMX's documentation, this what the argument does:

    Setting this property registered the Java VM platform's MBeans and published the Remote Method Invocation (RMI) connector via a private interface to allow JMX client applications to monitor a local Java platform, that is, a Java VM running on the same machine as the JMX client.

    This was supposed to be enabled automatically, but for some reason it wasn't on my Linux.

提交回复
热议问题