[SOLVED] java.lang.NoClassDefFoundError: Could not initialize class...

Started by tlf30, January 16, 2012, 07:17:46

Previous topic - Next topic

tlf30

I tried the new nightly release and this is the error, my code worked correctly in 2.8.2.

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
	at org.lwjgl.opengl.GLContext.<clinit>(GLContext.java:112)
	at org.lwjgl.opengl.GL11.glMatrixMode(GL11.java:2051)

This happens when calling:

GL11.glMatrixMode(GL11.GL_PROJECTION);

Matzon

try running with org.lwjgl.util.Debug = true

failing that - we need more info, somewhere the "Could not initialize class org.lwjgl.Sys" should be spit out. or even better attach a debugger and see why it is not working.

tlf30

This is all I get out of the debugger in netbeans: (could not find org.lwjgl.util.Debug)

Listening on javadebug
User program running
User program finished


This is the error message:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
	at org.lwjgl.opengl.GLContext.<clinit>(GLContext.java:112)
	at org.lwjgl.opengl.GL11.glMatrixMode(GL11.java:2051)
	at akclient.AKClient.renderINIT1(AKClient.java:317)
	at akclient.AKClient.main(AKClient.java:264)
Java Result: 1


This is the renderINIT1:

   private static void renderINIT1() {
        GL11.glMatrixMode(GL11.GL_PROJECTION);
        GL11.glLoadIdentity();
        GL11.glOrtho(0, 800, 600, 0, 1, -1);
        GL11.glMatrixMode(GL11.GL_MODELVIEW);
        GL11.glShadeModel(GL11.GL_SMOOTH);
    }


This is the statment causing the error:
GL11.glMatrixMode(GL11.GL_PROJECTION);


Also if you can tell me where the glLightfv method is that would be greate.

tlf30

Found the problem, I was not using the natives in the nightly release. :)

tlf30