installation & test program problems - linux

Started by username, July 25, 2005, 19:16:10

Previous topic - Next topic


I am trying to install LWJGL under linux kernel 2.6.11, distro Fedora Core 3, and java sdk 1.5.  I have extracted the zip version of LWJGL in the directory /home/username/javaprog/

After that I went into the lwjgl directory and jar, so my final working directory is:

From here I run the test command and my shell outputs this:

[username@localhost jar]$ java -cp lwjgl.jar:lwjgl_util.jar:lwjgl_test.jar:lwjgl_devil.jar:lwjgl_fmod3.jar -Djava.library.path=/home/tmcdemus/javaprog/lwjgl/jar/lwjgl.jar org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(
        at java.lang.Runtime.loadLibrary0(
        at java.lang.System.loadLibrary(
        at org.lwjgl.Sys.<clinit>(
        at org.lwjgl.opengl.Display.<clinit>(
        at org.lwjgl.test.WindowCreationTest.initialize(
        at org.lwjgl.test.WindowCreationTest.main(

Any idea what the problem is?


Did you install the Linux Native Libraries?  They came in the Zip file, and are .so files.  They need to be in your Java Path.  If that's not the problem, then I am at a loss, sorry!



if you're standing in the jar folder, do this:
java -cp lwjgl.jar:lwjgl_util.jar:lwjgl_test.jar:lwjgl_devil.jar:lwjgl_fmod3.jar -Djava.library.path=../native


Thanks for the quick reply guys.  The problem was with the .so files, they weren't included with the path.  I copied the .so files of .../lwjgl/native to:   /usr/local/jdk1.5.0_04/jre/lib/i386/
aka my jre path.
This makes sense now but it wasn't obvious to me from the install instructions that I had to set up another path (than the .jar file one) to talk to the hardware.  Thanks again.


No Problem!

I had the same trouble with the first OpenGL Java library I installed, it took me forever to find the trouble!


dont EVER copy them into the JRE - ALWAYS use the -Djava.library.path

it *will* make you go nuts later when you upgrade - just - dont - do - it


I ended up fixing that but thanks for the heads up!


look i hv a problem.. using eclipse ..
when i run my aplication :

QuoteException in thread "main" java.lang.NoClassDefFoundError: org.lwjgl.opengl.Display
  at java.lang.Class.initializeClass() (/usr/lib/
  at Limpia.cleanup() (Unknown Source)
  at Game.main(java.lang.String[]) (Unknown Source)
  at (/usr/lib/
  at (/usr/lib/

i define the argument in the eclipse . (run>arguments>vm argument)
"-Djava.library.path=/home/xxxx/lwjgl-linux-0.99/native/ "
and import the .jars files to ..

:( what its missing me.. :oops