Hello Guest

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

  • 4 Replies
  • 17859 Views
*

Offline tlf30

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

Code: [Select]
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:

Code: [Select]
GL11.glMatrixMode(GL11.GL_PROJECTION);
« Last Edit: January 18, 2012, 04:12:30 by tlf30 »

*

Offline Matzon

  • *****
  • 2242
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.

*

Offline tlf30

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

Code: [Select]
Listening on javadebug
User program running
User program finished

This is the error message:

Code: [Select]
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:

Code: [Select]
   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:
Code: [Select]
GL11.glMatrixMode(GL11.GL_PROJECTION);

Also if you can tell me where the glLightfv method is that would be greate.
« Last Edit: January 17, 2012, 05:12:41 by tlf30 »

*

Offline tlf30

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

*

Offline tlf30

  • **
  • 63
This thread is now closed