문제

Is there anyway to generate core/heap dump file when JVM crashes? Since these files are usually very helpful to find out bugs in code.

도움이 되었습니까?

해결책

With the following JVM options:

-XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath="/tmp"

JVM will dump the content of heap to a file in specified directory. Note that this only happens when OutOfMemoryError is thrown since dump isn't really needed if JVM crashed due to a different reason.

Edit: "Boolean options are turned on with -XX:+ and turned off with -XX:-." docs

다른 팁

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top