Cannot get LWJGL to work with NetBeans (macosx)

Started by billet, January 09, 2013, 00:40:45

Previous topic - Next topic

billet

Whenever I run the example code from for the LWJGL netbeans tutorial page I get the error: java.lang.NoClassDefFoundError. When doing the "testing full setup" part of the tutorial, the first test (looking at the source code of import org.lwjgl.LWJGLException;) seems to be correct with none of the errors mentioned coming up, the code I'm navigating to looks correct. However when I run the full test I get the error above. I'm not sure if it may be the "sources" section of setting up a new project which I have filled out "incorrectly" in some way as this seems the only place where there is any real room for error. At the moment by sources VM options are filled out -Djava.library.path=Users/palbillet/Documents/lwjgl-2.8.5/native/macosx which having followed the instructions from the tutorial seems to correct. I have tried it multiple different ways however, with -Djava.library.path="Users/palbillet/Documents/lwjgl-2.8.5/native/macosx" or -Djava.library.path=Users\palbillet\Documents\lwjgl-2.8.5\native\macosx. Any idea if this could be causing the issue and how to fix it? If not what is causing it and how do I fix that? Any help is greatly appreciated.

abcdef

Can you post the full error, ie the class it can't find. Try doing a build clean, it should refresh the dist directory which is what it uses when it runs

billet

Hi. Thanks for the reply. I've done as you suggested clean and build on the project but it hasn't made any difference.

The full error is: Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display
   at nblwjgl.Main.destroy(Main.java:97)
   at nblwjgl.Main.main(Main.java:62)

abcdef

what's in your classpath? And what jar files are in the dist/lib directory?

billet

In the lib folder inside the dist folder of the project are the jars jinput, lwjgl, lwjgl_util. Is this what you meant?