Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
运行libgdx lwjgl时Java运行时出现致命错误_Java_Eclipse_Libgdx_Lwjgl - Fatal编程技术网

运行libgdx lwjgl时Java运行时出现致命错误

运行libgdx lwjgl时Java运行时出现致命错误,java,eclipse,libgdx,lwjgl,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 l

我第一次尝试使用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.
我真的很感激任何帮助,这样我就可以学习这个伟大的工具! 对不起,如果我在问这个问题时做错了什么-第一篇文章