I'm currently working on a game based on Slick2D, but I ran into a problem.
When I try to run my game (no matter whether from dist or ide), I get the following error:
java.lang.UnsatisfiedLinkError: no jinput-linux64 in java.library.path
My directory structure is as following:
./lib
contains all the .jar's for libraries
./natives
contains the .dll's, .so's and .jnilib's
If I go to project options, and add -Djava.library.path=./natives
to VM options, it works properly. But in that case, I'd need to have all the native libraries inside the root folder of the dist. So I want to have a separate folder for all the natives, so my first line in my main has this:
System.setProperty("org.lwjgl.librarypath", System.getProperty("user.dir") + "/natives");
But for some reason, this doesn't give a standard linking error (e.g. lwjgl not found) but for some reason picks jinput-linux64
, but jinput is added as a library and is in the natives
folder.
Is there anything I've done wrong or is there a better approach to distributing my game effectively overall?
Thank you !