LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: Logan on November 22, 2014, 12:34:02

Title: [FIXED] LWJGL 3 Setup: Could not load native library
Post by: Logan on November 22, 2014, 12:34:02
Hey community,

i've got a question about setting up LWJGL  3 in eclipse. It seems, im just too dump for it.
I tried to add LWJGL 3 to my classpath like LWJGL 2, added the lwjgl.jar, added the path to the native library (native/windows/x86), but when i try to run the sample code, it says that it failed to load the native library lwjgl.dll. So there has to be a problem with the native library location, i think.

Thanks in advance.

Greetz
Title: Re: LWJGL 3 Setup: Could not load native library
Post by: spasi on November 22, 2014, 13:56:03
Could you please make sure you're using the latest nightly build (http://www.lwjgl.org/download) (#17 atm)? Also, you don't need to specify the OS & architecture anymore, simply use -Djava.library.path=native. If you're still having trouble, make sure the working path of your application is set to the parent of the native directory.
Title: Re: LWJGL 3 Setup: Could not load native library
Post by: Logan on November 22, 2014, 18:02:06
Hey,
thanks for your answer. Yes, im using the latest nightly.
How can i use -Djava.library.path (maybe in the code)?

Greetz
Title: Re: LWJGL 3 Setup: Could not load native library
Post by: spasi on November 22, 2014, 18:31:11
You can either launch the JVM with the -Djava.library.path argument, or use System.setProperty("org.lwjgl.librarypath", ...) at runtime (before using LWJGL).
Title: Re: LWJGL 3 Setup: Could not load native library
Post by: Logan on November 22, 2014, 19:16:03
Hello,
i set it at runtime and now it works!

Thanks!