Change the location that library .so files are placed

I compiled my game, but when I run the jar file, it creates a bunch of .so files in my home directory (in linux). Where is the code that sets the location of these libraries? Also, is there a way to not place the .so files in the filesystem at all, and keep them in the jar file?

The .so files are shared libraries. Linux doesn’t know anything about .jar files and so will not know how to look inside of them for its native shared libraries.

It should be putting them in the same directory you run the app from.

1 Like

You should put your .jar project inside a folder and them make a link to the Desktop to run it. Most programs need to unpack their stuff to work, so it’s best not to mess with the files they unpack.

1 Like

You can try

NativeLibraryLoader.setCustomExtractionFolder(String)

I don’t think so, but you can use a temp folder.