Hello Guest

[FIXED] LWJGL 3 Setup: Could not load native library

  • 4 Replies
  • 10270 Views
[FIXED] LWJGL 3 Setup: Could not load native library
« 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

*

Offline spasi

  • *****
  • 2140
    • WebHotelier
Re: LWJGL 3 Setup: Could not load native library
« Reply #1 on: November 22, 2014, 13:56:03 »
Could you please make sure you're using the latest nightly build (#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.

Re: LWJGL 3 Setup: Could not load native library
« Reply #2 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

*

Offline spasi

  • *****
  • 2140
    • WebHotelier
Re: LWJGL 3 Setup: Could not load native library
« Reply #3 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).

Re: LWJGL 3 Setup: Could not load native library
« Reply #4 on: November 22, 2014, 19:16:03 »
Hello,
i set it at runtime and now it works!

Thanks!