Is it possible to specify where JVM's crash dumps go?

We have a desktop application using JNI that occasionally causes the JVM to crash. Luckily the JVM produces a hs_err_pidXXXX.log file, which is quite useful in debugging such errors. However, it always seems to go to the current working directory, and it's annoying to dig it from there, since our other log files all go to a specific "log file place".

Is it possible to specify different location for those "crash dump" files? How?



Although the HeapDumpPath works for the heap dump it is not the answer for your question. The heap dump and the jvm crash log are two separate things.

To change the destination of the jvm crash log run java with this option:


Path/to/file is the place you want the JVM crash log to output.

By default the heap dump is created in a file called java_pidpid.hprof in the working directory of the VM. You can specify an alternative file name or directory with the -XX:HeapDumpPath= option. For example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated in the /disk2/dumps directory.

Need Your Help

Watin: Search in children of an element

c# testing automated-tests watin

I want to do a "two step" search using Watin. For example I would like to search for a ul-tag having class "abc". Then I would like to search for a certain li-tag inside that element. The code migh...

Prevent line break in this case

html css whitespace nowrap

I am trying to prevent line breaking in this Html