I've read many posts about this returning question, but I can't solve it…:
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
My Eclipse 3.2 doesn't seem to find the LWJGL DLLs… (I know).
Both jME and LWJGL are "installed" in c:devjme and c:devlwjgl dirs respectively. The lwjgl dir has the appropriate .nativewin32 dir containing the DLLs. But where in Eclipse 3.2 do I specify the -Djava.library.path="c:lwjglnativewin32" string so it can run my example? Compiling it works…
My Project home is in C:devtestapp. Do I use the wrong path delimiters? '/' instead of ''? Should I use relative paths like -Djava.library.path="…lwjglnativewin32"??
Here's the code I use:
public class Main extends SimpleGame
public static void main(String strArgs)
SimpleGame sg = new Main();
This code prints the Hello world! string in the Eclipse temrinal and then comes up with the exception, Goodbye world! is not printed.
Thanks for helping!
PS: I think it would really help to make this thread sticky or add it to the list of FAQs...
Toss that -D crap. Right click on the project -> Build Path -> Configure Build Path… Under the 'Source' tab, expand your project and set the "Native Library Location" value to where the .DLLs are. That's the proper Eclipsey way. If you have a jME project separate from your own project, you only need to set that in the jME project. Your project having a dependency on jME will automatically bring in the DLLs.
Basically I'd agree to toss the -D stuff… however, it's not a problem of compiling my app. It's about RUNNING it, so entering anything in some source/src tree probably misses the point.
The system somehow doesn't find the DLLs when using Eclipse's "Run…" , but I can't find the Eclipse way/place to tell where the DLLs are located. Even placing the DLLs directly into the WINNT/system32 dir had no effect.
Place the native libraries the root folder of your project (where eclipse has the .classpath and .project files), it will automatically find them here. Put all the other libraries (jars) in another package (src.lib is what I do) and make sure all these are incuded in the properties > java build path > libraries tab. I haven't ever had to explicitly include any natives, I just leave them in the root of my project and they get picked up.
Basically I'd agree to toss the -D stuff... however, it's not a problem of compiling my app. It's about RUNNING it, so entering anything in some source/src tree probably misses the point.
Uh, don't blow this one off before trying it, it IS the solution. Unfortunately in 3.2 it doesn't seem to work as well as it once did, making this setting for the jme project allows it to work with the testchooser, but my other projects that are dependant on the jme project had to have the jars with the library path set in them too.
Nice tuto. The UnsatisfiedLinkError stuff still doesn't help ME!
It seems my Eclipse install @work AND @home seem to have some "personal" problem... both Eclipses simply don't like to accept the native libararies, they aren't found - unless I copy them *directly* into the JRE/javaw dir show by Eclipse when running.
I have really tried Run... VM argument stuff sooooooooooo many times, I'm starting to get nightmares... 50 tries is nothing!
I have no clue why I seem to be the only one around not getting it to work... *sigh*
You are not the only person to have this problem, I seem to have it every time I update from CVS or install jME on a new computer (and of course update from CVS) and I've had all kinds of problem's with eclipse 3.2 (though cleaning projects seems to go a long ways towards fixing those when I hit them). Usually when I get frustrated and give up the light turns on and I figure it out/try it one last time and somehow it works even though I did the same thing over and over.