setting up LWJGL with eclipse

Started by robbierob555, November 18, 2010, 00:30:14

Previous topic - Next topic

robbierob555

im sure this has been asked before but i cant seem to find it on the boards,

ive set up the jar file and everything but when it comes to the natives i cant seem to get it right, every time i get a Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path error even though my path to the native is spot on. ive tried putting the
-Djava.library.path="Library/lwjgl/native/macosx" with quotes and without quotes in the VM area  and such but still cant seem to get it. any suggestions about what might be happening?

jediTofu

When a project is run inside Eclipse (and typically other IDE's as well), the current directory is the project's root directory (not the folder where the jar is created).

For instance, in NetBeans, you would need "./dist/Library/lwjgl/native/macosx"

Or, you're are trying to access the root directory of the file system, in which case you forgot the slash at the beginning (basing this off of Linux systems, as I'm not familiar with Mac OS X):  "/Library/lwjgl/native/macosx"

Make sure that you can go to the directory and that the natives are there.
cool story, bro

robbierob555

yay! ok i got it to run in netbeans by putting the slash at the beginning. however i couldnt get it to run in eclipse but it doesnt really matter, thanks bunches for your help

jacekcichy

In my eclipse project running on Win(x86/x64) I have VM arguments like this: -Djava.library.path=d:\lwjgl-2.6\native\windows
I hope it helps ;)

Evil-Devil

Depends on how you include LWJGL in Eclipse. As for using a the custom library aproach you set the jars and the path to the natives. The rest is up to eclipse. No additional -Djava.library.path needed ;)