Forum Stats

  • 3,853,528 Users
  • 2,264,231 Discussions


Misleading jcmd output in early access JDK9 ?

If I run JFR.check in build 9+181 , the response indicates that I can invoke VM.unlock_commercial_features.

This command is not available in the given VM.

The output should not refer to this command i VM where it is not available.


Martins-MacBook-Pro-2:Downloads marska$ java -version

java version "9"

Java(TM) SE Runtime Environment (build 9+181)

Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

Martins-MacBook-Pro-2:Downloads marska$ /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/jcmd 11700 JFR.check


Java Flight Recorder not enabled.

Use VM.unlock_commercial_features to enable.


  • Davidholmes-Oracle
    Davidholmes-Oracle Member Posts: 6
    edited Sep 6, 2017 5:39AM

    You're right it shouldn't. This seems to be a quirk of the Early Access builds which don't have commercial features in them. Some of the jcmd commands related to JFR are still listed, but can't actually be enabled, but the help says you can enable them via VM.unlock_commercial_features. But you can't because there are no commercial features, including the VM.unlock_commercial_features jcmd, in the Early Access build.

    With JDK 9 GA scheduled for September 21, build 9+181 is likely the final Early Access build, and the GA binaries won't be affected by this of course.

    Thanks for the report.

    David Holmes

    Hotspot Runtime Team