无法在mac osx上加载libgdx桌面应用程序 [英] Can't load libgdx desktop app on mac osx

查看:347
本文介绍了无法在mac osx上加载libgdx桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用我的Windows 7 PC上的libgdx开发一个简单的游戏。最近我买了一本macbook pro(山狮)。我下载并安装了JRE 7和eclipse,然后克隆并导入了项目。但是,当我运行桌面版本时,代码中没有错误,JVM加载并快速死机。控制台中出现的错误如下:

  JavaVM警告:加载JVM后必须调用JAWT_GetAWT 
_NSJVMLoadLibrary:NSAddLibrary失败/libjawt.dylib
JavaVM FATAL:功能查询JAWT_GetAWT失败。退出
AL lib:ReleaseALC:1个设备未关闭

我已经添加了JRE 7构建路径库,仍然没有喜悦。



桌面启动通过以下代码:

 code> import com.badlogic.gdx.backends.lwjgl.LwjglApplication; 
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

public class Main {
public static void main(String [] args){
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title =colourgame;
cfg.useGL20 = false;
cfg.width = 480;
cfg.height = 800;

new LwjglApplication(new ColourGame(),cfg);
}
}

真的坚持这个女士们和男士。请回来找我!谢谢。

解决方案

根据这个 http://lwjgl.org/forum/index.php/topic,4711.0.html
问题是与JRE 7更新6与Lwjgl的兼容性。



问题似乎在库的较新版本中被修复。我不知道libgdx是否相应升级,但您可以尝试将新版本放在libs文件夹中。


I have been developing a simple game using libgdx on my Windows 7 PC. Recently I bought a macbook pro (mountain lion). I downloaded and installed JRE 7 and eclipse, then cloned and imported the project. However though there are no errors in the code when I run the desktop version I the JVM loads and quickly dies. The error I get in the console is as follows:

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

I've added JRE 7 to the build path libraries, still no joy.

The desktop launches through this code:

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

public class Main {
    public static void main(String[] args) {
        LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
        cfg.title = "colourgame";
        cfg.useGL20 = false;
        cfg.width = 480;
        cfg.height = 800;

        new LwjglApplication(new ColourGame(), cfg);
    }
}

Really stuck on this ladies and gents. Please get back to me! Thanks.

解决方案

According to this http://lwjgl.org/forum/index.php/topic,4711.0.html problem is with compatibility of JRE 7 update 6 with Lwjgl.

Problem seems to be fixed in a newer release of the library. I'm not sure if libgdx is updaetd accordingly but you can try to put the new version in your libs folder.

这篇关于无法在mac osx上加载libgdx桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆