J.J. Beam
J.J. Beam

Reputation: 3059

How and where to get report after JVM crashing?

How to get reports about JVM after crashing?

There are some questions about JVM crashing: JBoss / HotSpot JVM crashing

But my question is: how to get the crashing report? Who and where stores it? (I suppose OS stores reports about failures processes but I wanna be sure and how to get it?)

UPDATE: it's not an error log, it's crush dump

Upvotes: 1

Views: 5476

Answers (2)

Dzmitry Krivolap
Dzmitry Krivolap

Reputation: 1424

The JVM crash log location is specified in run.bat (Windows) or run.sh (Linux) and is enabled by default.

Use these steps to disable the JVM crash log or to change the location in which the crash log is stored.

  1. Open /bin/run.bat (Windows) or /bin/run.sh (Linux) for editing.
  2. To disable JVM crash log reporting, comment out the line that specifies the JVM crash log location. For example, #ERROR_FILE="-XX:ErrorFile=$PA_HOME/log/java_error%p.log".
  3. To enable JVM crash log reporting, remove the comment tag and make the line active. For example, ERROR_FILE="-XX:ErrorFile=$PA_HOME/log/java_error%p.log".

Upvotes: 1

Gaming.ingrs
Gaming.ingrs

Reputation: 281

You should run JAVA with this option:

-XX:ErrorFile=/path/to/file

/path/to/file

is path to where You want to export Your crash report.

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

How to run JAVA (enter in console):

java -XX:ErrorFile=/path/to/file.log -jar myapp.jar

Upvotes: 3

Related Questions