After exporting to JAR LWJGL can’t be loaded

After I exported my application to JAR, using IntelliJ IDE, it doesn’t work. The main method is called and it shows the settings window with the monkey but when I hit OK, the app throws an exception:



[java]Exception in thread “LWJGL Renderer Thread” java.lang.UnsatisfiedLinkError: Can’t load library: C:/src/…/myApp.jar/lwjgl.dll[/java]



I noticed before that there is a lwjgl64.dll file in my Project root directory. I am not sure how it got there, because I didn’t put it there :). Anyways the app works from my IDE.



So I attached the lwjgl64.dll and a copy of it called lwjgl.dll to the build of the JAR file, so it is exactly at the spot where it says it can’t find it. It still doesn’t work.



Any ideas?

using IntelliJ IDE


use JME SDK based on Netbeans.

I am not sure how it got there, because I didn’t put it there


they are created when you launch your Jar. It's proper, the libs should be in same dir where main Jar is.

You have to include the content of jME3-lwjgl-natives.jar, the dll will be extracted automatically.

Perfect, thank you, will try that.



If it won’t work, I will import the project to JM SDK and export it from there.