installation & test program problems - linux

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

Previous topic - Next topic

username

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:
/home/username/javaprog/lwjgl/jar

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(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at org.lwjgl.Sys.<clinit>(Sys.java:61)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:96)
        at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:82)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:286)


Any idea what the problem is?

CaseyB

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!

CaseyB

Matzon

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

username

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.

CaseyB

No Problem!

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

Matzon

NOO
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

Anonymous

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

Anto

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/libgcj.so.6.0.0)
  at Limpia.cleanup() (Unknown Source)
  at Game.main(java.lang.String[]) (Unknown Source)
  at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
  at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

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

thank

Timkog