“A fatal error has been detected by the Java Runtime Environment” when running java project on another computer

橙三吉。 提交于 2019-12-10 11:07:59

问题


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:

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

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)?


回答1:


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.

The most interesting part of crash dump is the line
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.




回答2:


I had same issue today in Intellij. I resolved it by pointing to new JRE version.



来源:https://stackoverflow.com/questions/40638312/a-fatal-error-has-been-detected-by-the-java-runtime-environment-when-running-j

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