unsatisfied link

ok so it compiles fine but when I run it I get this


java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display
	at Game.cleanup(Game.java:105)
	at Game.main(Game.java:40)

so I quoted out the line to see wat happens, it compiles fine once again. then I get this:


java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
	at java.lang.System.loadLibrary(System.java:1030)
	at org.lwjgl.Sys$1.run(Sys.java:72)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
	at org.lwjgl.Sys.loadLibrary(Sys.java:81)
	at org.lwjgl.Sys.<clinit>(Sys.java:98)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
	at Game.init(Game.java:51)
	at Game.main(Game.java:34)

I got the code form http://gpwiki.org/index.php/OpenGL:Tutorials:Java:LWJGL:Introduction

thx in advance :slight_smile:

You need to specify the location (directory) of the lwjgl natives (.dlls on windows, .so on *nix) with -Djava.library.path="" on the command line (or in the jvm-args section of your IDE)

now I get this


Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display
        at Game.cleanup(Game.java:105)
        at Game.main(Game.java:40)

thx for fast reply :slight_smile:

NoClassDefFoundError ALWAYS means that it is missing a class - so you need to add something to the class path, specifically lwjgl.jar

I checked I could find the thing it is looking about in the library.

I figured out how to do it in my regular compiler:) GOOD BYE NETBEANS!!! HELLO BLUEJ. it works fine now.

thx for all your help.