Hi,
when i try to run my programm i get the
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
...
I use the current J2EE version on a Kubuntu 5.10 system with the current Eclipse Version.
I tried the following VM arguments:
-Djava.library.path=/home/ketobi/lwjgl/native;
-Djava.library.path=/home/ketobi/lwjgl/native/
-Djava.library.path=/home/ketobi/lwjgl/jar;
-Djava.library.path=/home/ketobi/lwjgl/jar/
-Djava.library.path=/home/ketobi/lwjgl/
-Djava.library.path=/home/ketobi/lwjgl;
none of them work.
But the Files are definitively there, readable, writeable, executable.
My programm was working fine on win xp but not now on Linux, why?
I'm trying now for a week, i asked people in the #eclipse #lwjgl #linux.de irc-channels.
They helped me much, thanks for that but the problem persists.
Please help me!
I think you need both the path to the .jar and the .dll files (/home/ketobi/lwjgl/native and /home/ketobi/lwjgl/jar). Have you tried that?
ok i tried it with
-Djava.library.path=/home/ketobi/lwjgl/native;
-Djava.library.path=/home/ketobi/lwjgl/jar;
and
-Djava.library.path=/home/ketobi/lwjgl/native/
-Djava.library.path=/home/ketobi/lwjgl/jar/
but the error is still there
what .dll files? in my native directory are only .so files. is that the error?
You have to download lwjgl-win32-0.99.zip. "so"-files are something like DLLs for Linux.
EDIT: Didn't read you have Linux. When you have Linux "so" should be right.
WiESi
As far as I remember you only need the path to native binaries in java.library.path, jars need to be in the classpath.
Why are you using semicolon ";" on Linux? It's a path separator on Windows (where : is used for a drive designation), but in Unix you use : for that. In your case, a simple
-Djava.library.path=/path/to/native
should do (provided everything else is correct). I think I used a relative path there and it worked on Mac and Linux:
-Djava.library.path=native
ok tried it with
-Djava.library.path=/home/ketobi/lwjgl/native
and
-Djava.library.path=native
no effect.
i tried to start the programm with the console (java Start -Djava.library.path=/home/ketobi/lwjgl/native)
and that seems even more messed up. i get:
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: Start
at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
...
Hmm, the java launcher usage is:
java [-options] YourClass [args]
For LWJGL you normally need:
java -cp your:class:path -Djava.library.path=native YourClass
Have a look at examples here:
http://lwjgl.org/installation.php
...still nobody answered there http://lwjgl.org/forum//viewtopic.php?t=1589 - so I try addressing the problems' next step here. A friend of mine almost got my game started on his Mac. Now, there's only one well-known exception left:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/cr/Desktop/R-A-0/native/liblwjgl.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.lwjgl.Sys$1.run(Sys.java:67)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:65)
at org.lwjgl.opengl.Display.<clinit>(Display.java:104)
Here's the line, which invoked the VM on Tiger:
mac:~/Desktop/R-A-0 cr$ java -classpath .:classes.jar:data.jar:libs.jar -Djava.library.path=native Main
Nothing complicated, but the native library's not found. The path and the working directory seems to be correct and I'm running out of clues. Anybody to the resue?
Cheers,
Christian
Are you trying to run on an Intel Mac by any chance?
Using LWJGL version 0.99 as released will not work on Intel (and produce this error). You'll need to replace LWJGL jars and native libs from a LWJGL game updated for Intel Mac - Puppygames' Titan Attacks is easiest to use.
If it's a PowerPC Mac your paths or library files must be wrong.
Quote from: "miu"Are you trying to run on an Intel Mac by any chance?
Gonna ask him today.
Quote from: "miu"If it's a PowerPC Mac your paths or library files must be wrong.
Double check this.
Thanks for the reply miu!
Sor
miu, true ... it's an Intel-Mac. *sigh* Thanks for the hint!
System - os.arch: "i386"
System - os.name: "Mac OS X"
System - os.version: "10.4.6"
Only trust your System properties! ;) I thought he'd know what machine he had right away... Intels are still quite new and "special" - unfortunately LWJGL 0.99 was released before Intel Macs.
If you want I can post a working Intel Mac LWJGL package somewhere.
Or extract it from Titan Attacks! from www.puppygames.net.
Please note - it "only" does OpenGL and OpenAL at the moment. FMOD and DevIL are not supported yet.
Fine - Titan Attacks! also has the ".app" directory structure I was looking for. Thanks for this hint, again. Does this LWJGL version only work with Intel-Macs? Meaning, we have two packages for MacOS X ... or will the PPC understand the LWJGL bindings that ship with Titan as well?
@OpenGL/AL only: totally fine with me, what else do you need?! :)
the release of 1.0 which is _very_ soon - just working out some compilation issues on intel mac with devil - will have a single lwjgl.jnilib file that includes both ppc and i386.
Quote from: "Matzon"the release of 1.0 which is _very_ soon
:twisted: Yehaa!
Sormuras: I'm glad that it finally worked for you! The packaging in Titan Attacks contains both PPC and Intel versions, although I can't test on PPC anymore. You'll notice there are "legacy" versions of libs for PPC.
OpenGL and AL was enough for my experimenting so far, apparently it's enough for Puppygames and Oddlabs! ;)
Matzon: Thanks for great news and all your effort (I hope someone's using FMOD/DevIL so it will be justified!). It will be great to have a Universal Mac build out - this thread shows how much confusion/frustration the Intel issue creates...
Any news on LWJGL 1.0 ? :wink:
is a delayed a bit - want to talk to elias about some things - but he's vanished for the time :?:
I'm not sure if this was ever solved but I'm having the same problem. I keep thinking that it's the path but I've tried just about everything. This is on an ubuntu 5.10 system and I really see know reason why its shouldn't be working.
The only known issue with ubuntu, is that of 64bit - but thats generally for all dists.
Any other issues, is probably a user error. I have confirmed myself that it works fint in ubuntu dapper, and with a proper sun jvm, I don't see why it wouldn't work in 5.10