JDK-8236974 : sun/tools/jmap/BasicJMapTest.java fails with "IllegalArgumentException: Unknown diagnostic command"
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 15
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2020-01-12
  • Updated: 2020-01-13
  • Resolved: 2020-01-13
Related Reports
Duplicate :  
Relates :  
Description
Exception in thread "main" com.sun.tools.attach.AttachOperationFailedException: java.lang.IllegalArgumentException: Unknown diagnostic command
	at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:130)
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309)
	at jdk.jcmd/sun.tools.jmap.JMap.executeCommandForPid(JMap.java:133)
	at jdk.jcmd/sun.tools.jmap.JMap.main(JMap.java:118)

Line 117-118 of JMap.java are:

            } else if (option.equals("-clstats")) {
                executeCommandForPid(pid, "jcmd", "GC.class_stats");

GC.class_stats was removed by JDK-8232759