LWJGL3 Jar Unable to extract LWJGL natives (SOLVED)

I am trying to build a Jar of my project to use with APITrace(trying to find rendering problem) but double clicking the jar doesn’t open it. So I tried running it through a cmd prompt and I get the following error:

FullSize: http://puu.sh/pdQ2v/059ae54fd0.png

http://puu.sh/pdQ2v/059ae54fd0.png

Note: The image also shows directory with natives.

I tried adding the following to the first line of my static void main(String… args) method:

Configuration.LIBRARY_PATH.set(new File("libs/LWJGL 3.0.0b/native").getAbsolutePath());

For the SharedLibraryLoader to work, the native libraries must be in the classpath.

[quote=“stuart6854,post:1,topic:57123”]
Note that [icode]new File(“libs/LWJGL 3.0.0b/native”)[/icode] will create a path relative to the working directory. Make sure it is the root of your project and it should work.

I find it really easy to make the natives in another JAR. Just go to the natives directory in LWJGL download and execute


$ jar -cfv lwjgl-natives.jar *

and then simply add lwjgl-natives.jar to the build classpath. LWJGL does all the necessary magic.

What are you using to run that command?

Use command prompt, or a Terminal. :point:

When I run that command in command prompt it says ‘jar’ is not a recognized command

Did you properly set your PATH environmental variable? Add the BIN directory of the JDK to the PATH so you get access to the jar command.