Are you sure there is no difference when running from the command line? Are the shared libraries extracted and loaded in the same way?
The shared libraries are loaded in the following order using System.load, glfw32.dll, lwjgl32.dll, OpenAL32.dll and jemalloc32.dll. There should be no difference when running from the command line, they are extracted and passed into System.load for each dll separately. If one dll fails to load, the next ones will not even be extracted.
Does that mean that with the compressed libraries lwjgl32.dll is loaded without issues (and fails with glfw32.dll)?
Nope, to test whether it was UPX compression that was preventing glfw32.dll from loading, I have sent him a build where I had all other DLLs except glfw32.dll compressed with UPX, and then the loading was failed at lwjgl32.dll which was UPX compressed but glfw32.dll which was not was loaded successfully.
Just noticed in the stacktrace above that you're using System.load with the extracted libraries. You shouldn't have to do that. Also, have you tried LWJGL's built-in native extraction?
Nope I didn't, I wanted to keep this NativesLoader class in my project, because I'm planning to make an Android port which doesn't use LWJGL from the same code base of my game, and I'm gonna integrate JBullet into the list soon so I kept this class for myself. I don't think that should be an issue.
It would be nice if I were able to reproduce this. Is there any chance you could send me your application to test locally?
Yeah sure. The latest build (with glfw32.dll uncompressed and others compressed) is available from this link (Requires Java 8 to work):
https://www.dropbox.com/s/z2k5bo142zr6lcn/Blox.jar?dl=0