LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: robbierob555 on November 18, 2010, 00:30:14

Title: setting up LWJGL with eclipse
Post by: robbierob555 on November 18, 2010, 00:30:14
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?
Title: Re: setting up LWJGL with eclipse
Post by: jediTofu on November 18, 2010, 03:13:24
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.
Title: Re: setting up LWJGL with eclipse
Post by: robbierob555 on November 18, 2010, 03:31:25
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
Title: Re: setting up LWJGL with eclipse
Post by: jacekcichy on November 18, 2010, 17:47:06
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 ;)
Title: Re: setting up LWJGL with eclipse
Post by: Evil-Devil on November 18, 2010, 18:21:20
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 ;)