1

我第一次尝试使用 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.

我真的很感激任何帮助,所以我可以学习这个很棒的工具!抱歉,如果我在提出这个问题时做错了什么 - 第一篇文章。

4

0 回答 0