It is posible to write hs_err_pid*.log in a specific directory (different than the class directory) when java virtual machine crash?

﹥>﹥吖頭↗ 提交于 2019-12-07 15:03:28

问题


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.


回答1:


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)



来源:https://stackoverflow.com/questions/4195114/it-is-posible-to-write-hs-err-pid-log-in-a-specific-directory-different-than-t

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!