How to test java -XX:ErrorFile option is set properly on Windows

Viewed 19

Background

  • You can use java -XX:ErrorFile=C:\path\to\file to specify the path of fatal error log.
  • To test that the -XX:ErrorFile option is set properly, you can use the kill -SIGSEGV command in the Linux environment.

Problem

In the Windows environment, I could not find the equivalent of kill -SIGSEGV. I have tried to kill the java.exe process from Windows Task Manager, but the fatal error log was not created.

You can use -Xmx option like java -XX:+CrashOnOutOfMemoryError -Xmx8m -XX:ErrorFile=C:\path\to\file to cause OutOfMemoryError intentionally, but I don't want to change current JavaVM command-line option.

Question

Is there any way to test the setting of the -XX:ErrorFile option in the Windows environment?

0 Answers
Related