Saturday, November 7, 2015

Java Mission Control JMC with Java 7 u79

jmc is installed OOTB with this jmc.ini file:


unfortunately it doesn't discover my local JVM (run with a JDK java!)

I get this error message:

"no local (attachable) JVM were detected". The JMC help says:
Why does Java Mission Control fail to find any local JVMs?
Consider the following:

•Make sure that you are using JAVA_HOME/bin/jmc to start the JMC client.

•If you are running JMC from Eclipse, make sure that Eclipse is running on a JDK (not JRE).

•Make sure that there is a directory named hsperfdata_username in the system's tmp directory, that it is writable by the user running JMC, and that the file system supports access control lists (ACLs).

First in the jmc.ini file I change ../jre/bin/ into C:\pierre\Java\jdk1.7.0_79\bin, then I select the C:\temp\hsperfdata_pierre folder and make it R/W (it was readonly!) and give full control to everyone. This time around all works fine. So sad that I don't get a better error message from JMC.... it would have been so simple just to display me a stacktrace or something more detailed. Even running "jmc -debug" didn't help...

If zou forget to run your program under test with the JMC options "-XX:+UnlockCommercialFeatures -XX:+FlightRecorder", you get this message:

Flight Recorder features are not enabled. To enable this you need to use a Java 7u4 or later JVM started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder.

No comments: