在Eclipse中運行項目 遇到如下錯誤:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000c0190, pid=2640, tid=2120
#
# JRE version: 7.0-b57
# Java VM: Java HotSpot(TM) Client VM (16.0-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C 0x000c0190
#
# An error report file with more information is saved as:
# D:\eclipse\ChatFrame0.5\hs_err_pid2640.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
是JAVA編譯器的問題,eclispe自帶的JRE編譯的,與你系統中的JDK版本有編譯后的沖突,
解決方法:把你項目的運行編譯環境全部指向你系統的JDK,再重編譯運行試試
具體如下:
1.使用命令查看jre的路徑
echo $JAVA_HOME
echo $JRE_HOME
echo $CLASSPATH
echo $PATH
echo $TOMCAT_HOME
2.右鍵項目名稱,在build path中找到Libraries下面的JRE System Libraries
點擊左側的Edit進行路徑的修改即可