Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336853

jcmd VM.class_hierarchy classname option does not seem to work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 24
    • hotspot
    • None
    • svc

      The command help is vague about what the `classname` option is supposed to do.

      It says: "classname : [optional] Name of class whose hierarchy should be printed." This could mean either one presents a leaf class and gets the base classes printed; or one presents a base class and gets a tree printed. But neither of the following invocations produce any output:

      ```
      $ jcmd Simple VM.class_hierarchy classname=java.lang.String
      322175:
      Command executed successfully
      $ jcmd Simple VM.class_hierarchy classname=java/lang/String
      322175:
      Command executed successfully
      $ jcmd Simple VM.class_hierarchy classname=java/lang/Object
      322175:
      Command executed successfully
      $ jcmd Simple VM.class_hierarchy classname=java.lang.Object
      322175:
      Command executed successfully
      ```

      Logically, at least one of them should print something, right? Or am I misunderstanding what "Class Hierarchy" means? In which case the help text should be improved.

            szaldana Sonia Zaldana Calles
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: