[RESOLVED] Class org.lwjgl.system.Library

Started by kfallah, December 21, 2015, 22:40:27

Previous topic - Next topic

kfallah

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
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)

Kai

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.

kfallah

Quote from: Kai 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.

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