Hello Guest

Cannot get LWJGL to work with NetBeans (macosx)

  • 4 Replies
  • 5168 Views
Cannot get LWJGL to work with NetBeans (macosx)
« on: January 09, 2013, 00:40:45 »
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.

*

Offline abcdef

  • ****
  • 320
Re: Cannot get LWJGL to work with NetBeans (macosx)
« Reply #1 on: January 09, 2013, 10:02:06 »
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

Re: Cannot get LWJGL to work with NetBeans (macosx)
« Reply #2 on: January 09, 2013, 10:38:31 »
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)

*

Offline abcdef

  • ****
  • 320
Re: Cannot get LWJGL to work with NetBeans (macosx)
« Reply #3 on: January 09, 2013, 11:07:36 »
what's in your classpath? And what jar files are in the dist/lib directory?

Re: Cannot get LWJGL to work with NetBeans (macosx)
« Reply #4 on: January 09, 2013, 17:46:19 »
In the lib folder inside the dist folder of the project are the jars jinput, lwjgl, lwjgl_util. Is this what you meant?