Hello Guest

[RESOLVED] Class org.lwjgl.system.Library

  • 2 Replies
  • 6173 Views
[RESOLVED] Class org.lwjgl.system.Library
« on: December 21, 2015, 22:40:27 »
I am running the exact getting started code except for the fact that the main method is in another class initializing 'HelloWorld'. I have the natives and jar referenced in my project. I can see org.lwjgl.system.Library in it. I have the natives set up correctly as well. Error does not occur when I move the main method back into the 'HelloWorld' class.

Exact error:

Code: (java) [Select]
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.system.Library
at org.lwjgl.system.MemoryAccess.<clinit>(MemoryAccess.java:22)
at org.lwjgl.system.Pointer.<clinit>(Pointer.java:22)
at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:594)
at org.qt.monk.opengl.HelloWorld.run(HelloWorld.java:31)
at org.qt.monk.GameClient.main(GameClient.java:15)
« Last Edit: December 22, 2015, 18:51:00 by kfallah »

*

Kai

Re: [Bug] Class org.lwjgl.system.Library
« Reply #1 on: December 22, 2015, 09:57:55 »
You mean, both the HelloWorld class from the lwjgl.org/guide site as well as your GameClient class are in the same "project" and just in different packages?
And when you have the main() method in HelloWorld it works, but when you have it in the GameClient it doesn't?
This sounds completely illogical.
Question: If you use an IDE where you can configure the classpath, librarypath and JVM arguments in a "run configuration" per class, did you probably configure two different run configurations for both the HelloWorld and the GameClient class when you run them?
Please show the command line arguments with which both classes are being run.
« Last Edit: December 22, 2015, 10:24:05 by Kai »

Re: [Bug] Class org.lwjgl.system.Library
« Reply #2 on: December 22, 2015, 18:50:49 »
You mean, both the HelloWorld class from the lwjgl.org/guide site as well as your GameClient class are in the same "project" and just in different packages?
And when you have the main() method in HelloWorld it works, but when you have it in the GameClient it doesn't?
This sounds completely illogical.
Question: If you use an IDE where you can configure the classpath, librarypath and JVM arguments in a "run configuration" per class, did you probably configure two different run configurations for both the HelloWorld and the GameClient class when you run them?
Please show the command line arguments with which both classes are being run.

You were right! For the one that wasn't working I had a VM command. Removed it and it was fixed.