This is weird, because if the file really had a virus, it shouldn't even run when double clicked on the JAR which is not the case, it only happens when he launched the game from command line.Info: He is using 32-bit Windows 10, and is using the built-in Windows Defender as the antivirus.
upx -d glfw32.dll
My game extracts the natives itself to a temp directory and loads them from there (Also sets lwjgl.library.path).
he said that he is still having the same issue, but this time with lwjgl32.dll.
I've told him that it is a false positive, but is there any way that we can avoid this?
Are you sure there is no difference when running from the command line? Are the shared libraries extracted and loaded in the same way?
Does that mean that with the compressed libraries lwjgl32.dll is loaded without issues (and fails with glfw32.dll)?
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?
It would be nice if I were able to reproduce this. Is there any chance you could send me your application to test locally?
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.
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.