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

jps displays full package names by default after jigsaw

XMLWordPrintable

      In JDK 8 jps will display output that looks like this:

      $ jps
      2349 Jps
      26941 TTY

      In JDK 9 - after jigsaw - it will display something like this

      $ jps
      2467 sun.tools.jps.Jps
      26941 com.sun.tools.example.debug.tty.TTY

      The reason is that the format for the sun.java.command property has changed after jigsaw. If the main-class is in a class in a module, the property will look something like "jdk.jdi/com.sun.tools.example.debug.tty.TTY" (with the module added to the front).

      sun.jvmstat.monitor.MonitoredVmUtil.mainClass() will fail to parse this new format and returns the full class name including package.

      I wonder if there are other uses of sun.java.command that also has problems.

            Unassigned Unassigned
            sla Staffan Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: