When using "jcmd <pid> VM.cds static_dump" to dump a CDS archive, information is printed in the stdout of the target process.
Terminal 1 (target process):
$ java -cp Wait.jar Wait
Static dump to file /jdk2/tmp/wait/java_pid15054_static.jsa
Terminal 2 (jcmd process):
$ jcmd Wait VM.cds static_dump
15054:
Static dump:
$
========================
We should print the information in the terminal of the jcmd process. This is more user friendly (the stdout of the target process may be redirected, or may have lots of other output). Also, this will be more consist with other JCMD options. E.g.,
$ jcmd Wait GC.heap_dump foo.dump
15054:
Dumping heap to foo.dump ...
Heap dump file created [2287282 bytes in 0.244 secs]
Terminal 1 (target process):
$ java -cp Wait.jar Wait
Static dump to file /jdk2/tmp/wait/java_pid15054_static.jsa
Terminal 2 (jcmd process):
$ jcmd Wait VM.cds static_dump
15054:
Static dump:
$
========================
We should print the information in the terminal of the jcmd process. This is more user friendly (the stdout of the target process may be redirected, or may have lots of other output). Also, this will be more consist with other JCMD options. E.g.,
$ jcmd Wait GC.heap_dump foo.dump
15054:
Dumping heap to foo.dump ...
Heap dump file created [2287282 bytes in 0.244 secs]