LWJGL
May 23, 2012, 03:45:26 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: [SOLVED] java.lang.NoClassDefFoundError: Could not initialize class...  (Read 1031 times)
tlf30
Regular nerd
**
Posts: 59



« on: January 15, 2012, 23:17:46 »

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

Code:
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:
GL11.glMatrixMode(GL11.GL_PROJECTION);
Logged
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #1 on: January 16, 2012, 04:50:49 »

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.
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
tlf30
Regular nerd
**
Posts: 59



« Reply #2 on: January 16, 2012, 21:06:59 »

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

Code:
Listening on javadebug
User program running
User program finished

This is the error message:

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

Also if you can tell me where the glLightfv method is that would be greate.
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #3 on: January 17, 2012, 20:10:33 »

Found the problem, I was not using the natives in the nightly release. Smiley
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #4 on: January 17, 2012, 20:11:26 »

This thread is now closed
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!