Java运行时环境检测到致命错误 - JRE崩溃

时间:2009-08-25 12:58:12

标签: java makefile

执行makefile时遇到致命错误。我已经给出了makefile和错误。我使用过“jdk 1.6 update 16”和“openSUSE ver 11”。请帮我解决这个问题。

**********
makefile:
**********

# Makefile for jni-bouncestudio

CC=gcc
CSRCS=JNIBounceStudio.c
COUT=libJNIBounceStudioNative.so
CFLAGS= -shared -I/usr/java/jdk1.6.0_16/include -I/usr/java/jdk1.6.0_16/include/linux/

JAVAH=javah
JHFLAGS= -classpath bin/
JHSRC=com.boogietools.bouncestudio.BounceStudio

JAVA=java
JAVAC=javac
JFLAGS= -Xlint -classpath lib/mail-1.3.2.jar -d bin/
JSRC=com/boogietools/bouncestudio/BounceStudio.java
JOUT=com/boogietools/bouncestudio/BounceStudio.class
JARG=outoffice.txt

all : compile javah javac

setup :     
    export LD_LIBRARY_PATH=$(PWD)

compile : $(CSRCS)
    $(CC) $(CSRCS) -o $(COUT) $(CFLAGS)

javah : $(JSRC)
    $(JAVAH) $(JHFLAGS) $(JHSRC)

javac : $(COUT)
    $(JAVAC) $(JFLAGS) $(JSRC)

run : all
    $(JAVA) -classpath bin/:lib/mail-1.3.2.jar $(JHSRC) $(JARG)


**********
Error:
**********

mail:/opt/bullseye/BounceManagement/boogie # make run
gcc JNIBounceStudio.c -o libJNIBounceStudioNative.so -shared -I/usr/java/jdk1.6.0_16/include -I/usr/java/jdk1.6.0_16/include/linux/
javah -classpath bin/ com.boogietools.bouncestudio.BounceStudio
javac -Xlint -classpath lib/mail-1.3.2.jar -d bin/ com/boogietools/bouncestudio/BounceStudio.java
java -classpath bin/:lib/mail-1.3.2.jar com.boogietools.bouncestudio.BounceStudio outoffice.txt
libBounceStudio32.so: cannot open shared object file: No such file or directory#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00000000, pid=7199, tid=1087683472
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Server VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  0x00000000
#
# An error report file with more information is saved as:
# /opt/bullseye/BounceManagement/boogie/hs_err_pid7199.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.
#
make: *** [run] Aborted

1 个答案:

答案 0 :(得分:1)

错误发生在java运行之前

  

java -classpath bin /:lib / mail-1.3.2.jar com.boogietools.bouncestudio.BounceStudio outoffice.txt   libBounceStudio32.so:无法打开共享对象文件:没有这样的文件或目录#

我注意到您的C代码尝试构建libJNIBounceStudioNative.so并且您的java代码尝试访问libBounceStudio32.so

您是否因名称

而出错

否则我们需要了解有关C代码的更多信息