Usage:
• -XX:ErrorFile=<filename>
The filename parameter may contain the special sequence %p, which is replaced by the process identifier of the JVM process.
Example:
java -XX:ErrorFile=./java_error.log
Specifies that error data should be written to java_error.log in the current working directory of the Java process.
Linux/MacOS example: java -XX:ErrorFile=/var/log/java/java_error_%p.log
Writes error data to the system /var/log/java/ folder, with the file name containing the identifier of the Java process.
Windows example:
java -XX:ErrorFile=C:\log\java\java_error_%p.log Writes error data to the system C:\log\java folder, with the file name containing the identifier of the Java process.
Description:
The -XX:ErrorFile option controls where error data is written when the JVM
crashes due to an unrecoverable error. This data may be useful to analyse the
causes of the crash.
To obtain more information in this file, the -XX:+ExtensiveErrorReports flag
can be enabled.
If the specified file is not writeable then the file is created in the temporary
directory for the operating system. On Linux and MacOS the temporary directory
is /tmp. On Windows it is the value of the TMP environment variable.
Default Value:
The default value of -XX:ErrorFile is:
-XX:ErrorFile=./hs_err_pid%p.log
meaning that error data is written to the current working directory with the name hs_err_pid.log, where is substituted with the identifier of the Java process.
Errors:
None
Arguments Related to -XX:ErrorFile:
TODO: link to -XX:+ExtensiveErrorReports TODO: link to -XX:OnError
TODO: link to -XX:OnOutOfMemoryError
NOTE:
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your
insights will help the entire 10+ million java developer community to develop
one standard source of documentation for all the JVM arguments.
Edit your Comment