无法在mac osx上加载libgdx桌面应用程序 [英] Can't load libgdx desktop app on mac osx
问题描述
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屋!