Windows 7 上不会为已安装的应用程序创建 hs_err_pid 文件

发布于 01-03 12:38 字数 421 浏览 4 评论 0原文

我有一个 Java 应用程序,它使用一堆 JNI 调用在 Windows 上执行低级内容。当我让 JVM 自愿崩溃时,我注意到它没有生成任何对于调试非常有用的 hs_err_pid.log 文件。

行为如下:

  • 当我从 Eclipse 运行它时 ==> 该文件是在当前工作目录中创建的
  • 当我编译我的应用程序并运行 .exe ==> 时, 。该文件是在当前工作目录中创建的
  • 当我运行安装程序并从 C:\Program Files\... 中的 .exe 运行我的应用程序时,我仍然在控制台中收到错误消息:告诉我 JVM 崩溃了,并且在 C:\Program Files\MyApp\hs_err_pid3060.log 中创建了崩溃报告,但该文件不存在。

知道是什么导致了这种行为吗?

I have a Java app that use a bunch of JNI calls to execute low level stuff on Windows. When I make the JVM crash voluntarily, I noticed that it is not producing any hs_err_pid.log file which would be very useful for debugging.

Here is the behavior:

  • When I run it from Eclipse ==> The file is created in the current working dir
  • When I compile my app and run the .exe ==> The file is created in the current working dir
  • When I run the installer and run my app from the .exe in C:\Program Files\..., I still get the error message in the console that tells me the JVM crashed and a crash report has been created in C:\Program Files\MyApp\hs_err_pid3060.log, but the file does not exist.

Any idea on what's causing this behavior?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

标点2025-01-10 12:38:25

可能是你的应用权限不够造成的。 jvm写入文件已被操作系统阻止。您可以尝试使用管理员权限运行您的应用程序,看看它是否有效。

Maybe it's caused by insufficient privilege of your app. The file writing by jvm has been blocked by the OS. You can try running your app with admin privilege and see if it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文