codeguide 5.0

anyone use lwjgl with this. I seem to have some troubles. I have included the lwjgl jar but this means nothing

java.lang.UnsatisfiedLinkError: getAvailableDisplayModes
at org.lwjgl.Display.getAvailableDisplayModes(Native Method)
at Nehe01.(Nehe01.java:33)
Exception in thread “main”

part of the code:

line 33 is:DisplayMode[] modes = Display.getAvailableDisplayModes();


public final class Nehe01
{

        // Display mode setup...
      static
      {
            try
            {
                    // Create The Display Mode
                  int mode = -1;
                  DisplayMode[] modes = Display.getAvailableDisplayModes();
                  for(int i = 0; i < modes.length; i ++)
                  {
                        if(modes[i].width == 800 && 
                           modes[i].height == 600 && 
                           modes[i].bpp >= 16)
                        {
                              mode = i;
                              break;
                        }       
                  } 


looks like it can’t find the native library

DUH… yes that was it… reached a new error?.

java.lang.IllegalAccessError: tried to access class org.lwjgl.opengl.BaseGL from class Nehe01
at Nehe01.(Nehe01.java:64)
Exception in thread “main”

whats this??

It could be that the native code is missing. Make sure you have lwjgl.dll in the same directory. And make sure the actual Jar is in the classpath, eg. C:\lwjgl\lwjgl.jar, not just c:\lwjgl