简体   繁体   中英

Eclipse on Mac throwing Error "java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException"

Immediate disclaimer: I've been using LWJGL since 2010. I am currently stuck coding in Eclipse on a 2009 Macbook for reasons out of my control. This error has never popped up for me before, and once I'm back on Windows it never will again.

So I'm currently trying to set up a LWJGL project, and during the initial steps of getting a window running, the program will refuse to run, throwing this error:

Error: Unable to initialize main class Boot Caused by: java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException

Now, I know the problem is with the Native Libraries not being loaded. However, I have the LWJGL.jar file pointing to Natives/macosx/ , but it's still throwing this error.

Can somebody tell me what's going on, how many.dylib files should be in Natives/macosx, and how to resolve it without just installing Windows 7 and coding on there.

I got the same error when I used IntelliJ IDE, so try to go into your eclipse settings => dependency and make sure that the below-mentioned dependencies are included ( especially the versions and the type of OS ).

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM