java 在另一台计算机上运行java项目时“Java运行时环境检测到一个致命错误”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40638312/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"A fatal error has been detected by the Java Runtime Environment" when running java project on another computer
提问by BamSquid
I created a Java project in Netbeans that runs without issue on my computer (both in Netbeans and from running the jar file), but when I try to run the project on another computer I get the following error message:
我在 Netbeans 中创建了一个 Java 项目,该项目在我的计算机上运行没有问题(在 Netbeans 中和运行 jar 文件),但是当我尝试在另一台计算机上运行该项目时,我收到以下错误消息:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000062478337, pid=2860, tid=0x0000000000000e84
JRE version: Java(TM) SE Runtime Environment (8.0_112-b15) (build 1.8.0_112-b15) Java VM: Java HotSpot(TM) 64-Bit Server VM (25.112-b15 mixed mode windows-amd64 compressed oops) Problematic frame: V [jvm.dll+0x68337]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
If you would like to submit a bug report, please visit: http://bugreport.java.com/bugreport/crash.jsp
Java 运行时环境检测到一个致命错误:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) 在 pc=0x0000000062478337,pid=2860,tid=0x0000000000000e84
JRE 版本:Java(TM) SE 运行时环境 (8.0_112-b15) (build 1.8.0_112-b15) Java VM:Java HotSpot(TM) 64 位服务器 VM(25.112-b15 混合模式 windows-amd64 压缩 oops)有问题框架:V [jvm.dll+0x68337]
无法写入核心转储。默认情况下,客户端版本的 Windows 不启用小型转储
如果您想提交错误报告,请访问:http: //bugreport.java.com/bugreport/crash.jsp
I've searched for similar issues but I can't seem to find anything that matches my error, so I'm not sure what to do. I can post the full error log if need be. If no one can figure it out, can someone at least point me in the right direction (is it a memory issue, do I need to update Java, etc)?
我搜索过类似的问题,但似乎找不到与我的错误相符的内容,所以我不确定该怎么做。如果需要,我可以发布完整的错误日志。如果没有人能弄清楚,至少有人能指出我正确的方向(这是内存问题,我是否需要更新 Java 等)?
回答by apangin
According to hs_err_pid.log
the crash has happened inside the native method com.microsoft.sqlserver.jdbc.AuthenticationJNI.SNISecGenClientContext
which apparently belongs to MSSQL JDBC driver.
根据hs_err_pid.log
崩溃发生在com.microsoft.sqlserver.jdbc.AuthenticationJNI.SNISecGenClientContext
显然属于 MSSQL JDBC 驱动程序的本机方法中。
The most interesting part of crash dump is the lineC:\Program Files\Java\jre1.8.0_112\bin\sqljdbc_auth.dll
崩溃转储最有趣的部分是这一行C:\Program Files\Java\jre1.8.0_112\bin\sqljdbc_auth.dll
Obviously, sqljdbc_auth.dll
does not belong to JRE. Looks like this file was copied manually to JRE directory. This is wrong, and most likely the reason of the crash. You have to install MSSQL JDBC driver correctly and set -Djava.library.path
JVM argument to point to the directory with driver native libraries.
显然,sqljdbc_auth.dll
不属于JRE。看起来这个文件是手动复制到 JRE 目录的。这是错误的,而且很可能是崩溃的原因。您必须正确安装 MSSQL JDBC 驱动程序并将-Djava.library.path
JVM 参数设置为指向包含驱动程序本机库的目录。
回答by user0803
I had same issue today in Intellij. I resolved it by pointing to new JRE version.
我今天在 Intellij 中遇到了同样的问题。我通过指向新的 JRE 版本解决了它。