Hi Martin,

I think this is just a peculiarity of the Java 9 early access builds. Those builds don't include any commercial features - which includes the Dcmds to check or enable commercial features. However the JFR Dcmds are still listed as available, but of course inoperative as they are commercial features and need to be enabled. The help information isn't aware that early-access builds don't have commercial features so it helpfully tells you how you would normally enable JFR.

This will soon be moot as Java 9 is released.

Also note, as per the download page:

http://jdk.java.net/9/

issues pertaining to the EA builds should be reported at https://community.oracle.com/community/java/java_desktop/java-se-early-access. Those builds are not part of the OpenJDK and so issues pertaining to them should not be raised on OpenJDK mailing lists.

Thanks,
David
-----

On 6/09/2017 5:14 PM, David Holmes wrote:
On 6/09/2017 5:13 PM, Martin Skarsaune wrote:
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)


Also included in the first message ;-)

It wasn't clear that process 11700 was running the exact same JVM.

Thanks,
David


ons. 6. sep. 2017 kl. 09:10 skrev David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>>:

    Hi Martin,

    On 6/09/2017 5:00 PM, Martin Skarsaune wrote:
     > Hi David
     >
     > Details below.

    What does "java -version" show for that JVM please.

    Thanks,
    David

     > Cheers
     >
     > Martin
     >
     > Martins-MacBook-Pro-2:Downloads marska$
     > /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/*jcmd
     > 11700 VM.command_line*
     >
     > 11700:
     >
     > VM Arguments:
     >
     > java_command: hawtio-app-1.5.3.jar
     >
     > java_class_path (initial): hawtio-app-1.5.3.jar
     >
     > Launcher Type: SUN_STANDARD
     >
     > Martins-MacBook-Pro-2:Downloads marska$
     > /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/*jcmd
     > 11700 help*
     >
     > 11700:
     >
     > The following commands are available:
     >
     > JFR.configure
     >
     > JFR.stop
     >
     > JFR.start
     >
     > JFR.dump
     >
     > JFR.check
     >
     > VM.log
     >
     > VM.native_memory
     >
     > ManagementAgent.status
     >
     > ManagementAgent.stop
     >
     > ManagementAgent.start_local
     >
     > ManagementAgent.start
     >
     > Compiler.directives_clear
     >
     > Compiler.directives_remove
     >
     > Compiler.directives_add
     >
     > Compiler.directives_print
     >
     > VM.print_touched_methods
     >
     > Compiler.codecache
     >
     > Compiler.codelist
     >
     > Compiler.queue
     >
     > VM.classloader_stats
     >
     > Thread.print
     >
     > JVMTI.data_dump
     >
     > JVMTI.agent_load
     >
     > VM.stringtable
     >
     > VM.symboltable
     >
     > VM.class_hierarchy
     >
     > GC.class_stats
     >
     > GC.class_histogram
     >
     > GC.heap_dump
     >
     > GC.finalizer_info
     >
     > GC.heap_info
     >
     > GC.run_finalization
     >
     > GC.run
     >
     > VM.info
     >
     > VM.uptime
     >
     > VM.dynlibs
     >
     > VM.set_flag
     >
     > VM.flags
     >
     > VM.system_properties
     >
     > VM.command_line
     >
     > VM.version
     >
     > help
     >
     >
     > For more information about a specific command use 'help <command>'.
     >
     > Martins-MacBook-Pro-2:Downloads marska$
     >
     >
     > ons. 6. sep. 2017 kl. 08:53 skrev David Holmes
    <david.hol...@oracle.com <mailto:david.hol...@oracle.com>
     > <mailto:david.hol...@oracle.com <mailto:david.hol...@oracle.com>>>:
     >
     >     Hi Martin,
     >
     >     On 6/09/2017 4:38 PM, Martin Skarsaune wrote:
     >      > Hi
     >      >
     >      > 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.
     >      >
     >      > Cheers
     >      >
     >      > Martin Skarsaune
     >      >
     >      >
     >      > Example:
     >      >
     >      > 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
     >      >
     >      > 11700:
     >
     >     What JVM is process 11700? What does "jcmd 11700 help" show?
     >
     >     Thanks,
     >     David
     >     -----
     >
     >      > Java Flight Recorder not enabled.
     >      >
     >      >
     >      > Use VM.unlock_commercial_features to enable.
     >      >
     >      >
     >

Reply via email to