如何在Windows上使用Java Hotspot JVM禁用minidump(mdmp)文件生成

编程入门 行业动态 更新时间:2024-10-11 15:18:32
本文介绍了如何在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)文件生成

本文发布于:2023-11-07 02:05:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565265.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   如何在   Java   Windows   Hotspot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!