We are running a java application under java 1.6.0_13. When it crashes it creates the normal hs_err_pid file. I don't want this file created even if the application crashes. Is there a way on the java command line to suppress this? I am familiar with -XX:ErrorFile option. If I set this to an empty string will that suppress it?
The file hs_err_pid. mdmp is a memory dump from a process crash. Any process can create this memory dump. You can safely remove them from server if you face any space issue in your environment.
“hs_err_pid” error is usually related to java. It's likely that the version of java installed on your computer is either out of date or corrupted. I'd recommend you to uninstall and reinstall Java on your computer.
If you are using a Unix/Linux system, try setting -XX:ErrorFile
to /dev/null
(or, if you are using Windows, try NUL
).
With Oracle HotSpot (since 6b21
) and OpenJDK, the -XX:+SuppressFatalErrorMessage
option should be used for preventing creation of the hs_err_pid
file.
Nowadays, using -XX:ErrorFile=/dev/null
will actually not work as expected, since if the file path specified to ErrorFile
exists, the JVM will not attempt to overwrite it and will fall back to the default hs_err_pid
location (there's no special case handling for /dev/null
).
For more details, see also:
SuppressFatalErrorMessage
to skip all error handling logic on fatal error-XX:ErrorFile
doesn't work.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With