JRE中的致命错误 [英] Fatal Error in JRE
问题描述
我正在处理一个应用程序,并决定更新java到java7。完成后,并设置适当的值到env。变量$ PATH和$ JAVA_HOME,我得到以下错误:
#
#检测到致命错误Java运行时环境:
#
#SIGSEGV(0xb)at pc = 0x00007f19addeaa34,pid = 28052,tid = 139748278572864
#
#JRE版本:Java环境(7.0_40-b43)(build 1.7.0_40-b43)
#Java VM:Java HotSpot TM 64位服务器虚拟机(24.0-b56混合模式linux-amd64压缩环境)
#有问题的框架:
#V [libjvm.so + 0x644a34] get_method_id(JNIEnv_ *,_jclass *,char const *,char const *,bool,Thread *)+ 0x84
#
#写核心转储。核心转储已禁用。要启用核心转储,请在再次启动Java之前尝试ulimit -c unlimited
#
更新:Java和JavaC:
> java -version
java版本1.7.0_40
Java(TM)SE运行时环境(build 1.7.0_40-b43)
Java HotSpot -bt服务器VM(构建24.0-b56,混合模式)
javac -version
javac 1.7.0_40
您将 NULL
传递为 clazz $当调用
GetMethodID
时,c $ c>参数,因此程序在尝试运行方法时会收到一个 SEGV
。发生这种情况可能是因为您在使用的类无法找到,当你加载它早,你没有检查错误检查。所以:
- 添加错误检查,以便您知道是否无法加载要使用的类。如果您使用
FindClass
函数,请检查它不返回NULL。 - 无法找到类可能是因为它不是在类搜索路径。检查是否需要在运行程序时设置
CLASSPATH
环境变量,或者如果需要设置java.class.path
系统属性。
I am working on an application and decided to update java to java7. After doing this and setting the appropriate values to env. variables $PATH and $JAVA_HOME, I get the following error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f19addeaa34, pid=28052, tid=139748278572864
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x644a34] get_method_id(JNIEnv_*, _jclass*, char const*, char const*, bool, Thread*)+0x84
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
Any help is appreciated.
Update: Java and JavaC:
java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
javac -version
javac 1.7.0_40
You are passing NULL
as the clazz
parameter when you call GetMethodID
, so the program receives a SEGV
signal when it tries to run the method. This happens probably because the class you are using could not be found when you loaded it earlier, and you don't have error checking to detect that. So:
- Add error checking so that you'll know if the class you want to use couldn't be loaded. If you are using the
FindClass
function, check that it doesn't return NULL. - The class couldn't be found probably because it wasn't on the class search path. Check if you need to set the
CLASSPATH
environment variable when running your program, or if you need to set thejava.class.path
system property when creating the JVM.
这篇关于JRE中的致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!