如何在Windows上使用Java Hotspot JVM禁用minidump(mdmp)文件生成 [英] How to disable minidump (mdmp) files generation with Java Hotspot JVM on Windows

查看:583
本文介绍了如何在Windows上使用Java Hotspot JVM禁用minidump(mdmp)文件生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个已部署的可执行jar文件,可在崩溃时创建大型(7+ Gb)minidump文件。我想有一个文本表示导致崩溃的原因,而不是JVM状态的二进制文件。我已尝试使用此CodeRanch帖子中的信息和我在Java文档中找到的文档 似乎没有帮助。

Currently I have a deployed executable jar file that creates large (7+ Gb) minidump files when it crashes. I would like to have a text representation of what caused the crash, not a binary file of the JVM state. I've tried using the information found in this CodeRanch post and the documentation that I've found in the Java documentation doesn't seem to help.

我还引用了这个问题但是没有确定的答案。

I also referenced this question but there's no definitive answer.

这是否有一种典型的方法我不知道的?

Is there a typical way this is done that I'm not aware of?

推荐答案

我找到了一个似乎可以做我想要的命令行选项。使用

I found a command line option that seems to do what I want. Launching the jar with

java -XX:-CreateMinidumpOnCrash -jar myJar.jar

似乎可以做到这一点,并且会生成与小型转储相比非常小的错误日志。

Seems to do the trick and will generate error logs that are very small compared to the minidumps.

这篇关于如何在Windows上使用Java Hotspot JVM禁用minidump(mdmp)文件生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆