3

When a java application crash outside the java virtual machine generate a log file hs_err_pidXXXX.log in the same directory than the class running.

It's posible generate this file in a different directory?

My client want to change to read only this directory, but i don't like to lose this files.

ealmeida
  • 444
  • 3
  • 11

1 Answers1

9

I think the -XX:ErrorFile JVM arg will work.

See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5107646 and http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=5515dc81f6e66149b8cd377f59bf1?bug_id=4872551 for details

http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html contains a list of VM options (Thanks @Peter Štibraný who's earlier answer added this link)

Martijn Verburg
  • 3,287
  • 21
  • 26
  • 2
    Yes, this is right one. Check also list of all config options: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html – Peter Štibraný Nov 16 '10 at 14:32