How to get JVM core dump (core dump)?

I want to dump all the classes loaded by the virtual machine through the ClassDump in sa-jdi.jar.

ClassDump supports dump classes from jvm processes or jvm core dump.

for online applications, you should not dump, pid directly if you want to get a core dump first.

in visual vm, you can read core dump files.

clipboard.png

but doesn"t know how to get core dump.
May.12,2021

kill -3 pid
The response behavior of different applications under

linux is different. For jvm, it is shown in the standard output by default.
can be redirected to a file via > .

$ jps
20226 jar
20383 Jps
$ kill -3 20226

2018-08-30 13:09:04
Full thread dump OpenJDK 64-Bit Server VM (25.181-b13 mixed mode):

"TimerQueue" -sharp23 daemon prio=5 os_prio=0 tid=0x00007fa70c04f000 nid=0x4f1e waiting on condition [0x00007fa72056d000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000076d530c48> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    at java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
    at javax.swing.TimerQueue.run(TimerQueue.java:174)
    at java.lang.Thread.run(Thread.java:748)

"DestroyJavaVM" -sharp22 prio=5 os_prio=0 tid=0x00007fa79400a800 nid=0x4f03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-0" -sharp17 prio=6 os_prio=0 tid=0x00007fa79461b800 nid=0x4f19 waiting on condition [0x00007fa7222e7000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000006c6201be0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:554)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:187)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
......
Menu