According to the documentation, you can automatically take a bunch of dumps when an application encounters an OutOfMemoryException.
After the OutOfMemoryException process simply disappears from the menu on the left.
How does this feature work in VisualVM?
Thanks.
C: \ work \ temp> java -XX: HeapDumpPath = c: /work/temp/file.hprof -XX: + HeapDumpOnOutOfMemoryError -jar example.jar
source share