getting LWJGL running on LINUX

Hi there,

I am trying to get LWJGL to run on a UNIX system, I am trying to run java -cp lwjgl.jar:lwjgl_util.jar:lwjgl_test.jar: org.lwjgl.test.WindowCreationTest
from the instalation page on the site but when I try I keep getting the following error:

Exception in thread “main” java.lang.NoClassDefFoundError: org/lwjgl/test/WindowCreationTest

Can anyone explain why this is happening and what I can do to fix it?

Cheers,

Stephen

uhm, are you standing in the dir with the jars ?

im having the same problem only on windows, i just need to know where the .jar files should be extracted.

-chadwic

When I try to run the Window test I get the error:
Exception in thread “main” java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at org.lwjgl.Sys.initialize(Sys.java:129)
at org.lwjgl.Sys.(Sys.java:96)
at org.lwjgl.opengl.Display.(Display.java:93)
at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:55)

When I try to set the classpath using the command:
-Djava.library.path=
I get the error:
-Djava.library.path=: No such file or directory.

I think the command I am using may be incorect but I am not sure. Possibly I am setting the library path incorectly, is there anywhere specific that the initial download has to be extracted to?

If someone could explain what the commands in the instalation guide are ment to be doing I may be able to work out whetyher I am setting things up correctly.

That -DJava…whatever command should be an arg to the Java VM when you launch it, not an actual command you enter at the shell.

[quote]That -DJava…whatever command should be an arg to the Java VM when you launch it, not an actual command you enter at the shell.
[/quote]
Any idea how I would pass the argument in that case? I am planning on finally using Eclipse to work on it so I wonder if you could tell me how to do it in Eclipse as well?

Another question is what exactly is the runtime library? Is it the stuff contained in the extracted org files? Should the virtual machine link point directly to it or should it point to the file that contains it?

In Eclipse you need a run/debug config, (Project->Run I think). Once you’ve set up your main class etc. theres a box for VM args that you can just paste that into, dead easy.

Oh, and remember the -ea flag there as well, LWJGL does glGetError and a few other niceties if thats on.

Cool but where exactly do I want top point the VM to? That seems to be the problem at the mometn, also in eclipse it doesnt seem to like the import statements I am trying out.

[quote]In Eclipse you need a run/debug config, (Project->Run I think). Once you’ve set up your main class etc. theres a box for VM args that you can just paste that into, dead easy.

Oh, and remember the -ea flag there as well, LWJGL does glGetError and a few other niceties if thats on.
[/quote]
That was a long time ago :slight_smile: LWJGL doesn’t use assertions anymore, now that all checks are always enabled.

  • elias

Allright, now I have tried to get the Game thing working in eclipse but when I run it at the moment I get this error:

Exception in thread “main” java.lang.NoClassDefFoundError: Game

Anyone got any idea what this means?

that it can’t find any class called Game… and rightfully so - it should have somekind of package info too ?