-
Bug
-
Resolution: Duplicate
-
P2
-
9
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.
$ 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.
- duplicates
-
JDK-8156537 Tools using MonitoredVmUtil do not parse module in cmdline correctly
- Resolved