运行libgdx lwjgl时Java Runtime发生致命错误

时间:2013-08-18 13:08:30

标签: java eclipse libgdx lwjgl

我第一次尝试使用libGDX并且我已经下载了lwjgl库并且我试图简单地打开一个窗口并且Java运行时环境会检测到致命错误。我得到了一个不同的错误:

JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
_NSJVMLoadLibrary: NSAddLibrary failed for /libjawt.dylib
JavaVM FATAL: lookup of function JAWT_GetAWT failed. Exit
AL lib: ReleaseALC: 1 device not closed

但添加后:

System.loadLibrary("jawt");

它已更改为运行时错误。

代码是:

   import com.badlogic.gdx.backends.lwjgl.LwjglApplication;

public class GameStarter {

    public static void main(String[] args) {
        System.loadLibrary("jawt");
        new LwjglApplication(new Game(), "Chess", 480, 320, false);
    }

}

错误文件说:

 A fatal error has been detected by the Java Runtime Environment:

  SIGSEGV (0xb) at pc=0x00000001274d4388, pid=1186, tid=5891

 JRE version: 7.0_25-b15
 Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode bsd-amd64 compressed oops)
 Problematic frame:
 C  [liblwawt.dylib+0xe388]  JNI_OnLoad+0x96

 Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

 An error report file with more information is saved as:
 /Users/simonwatkins/Documents/workspace/Chess/hs_err_pid1186.log

 If you would like to submit a bug report, please visit:
   http://bugreport.sun.com/bugreport/crash.jsp
 The crash happened outside the Java Virtual Machine in native code.
 See problematic frame for where to report the bug.

我真的很感激任何帮助,所以我可以学习这个伟大的工具! 对不起,如果我在提出这个问题时做错了什么 - 先发帖。

0 个答案:

没有答案