Native libraries used by JNI can be shipped in the jar files and are read from the classpath, in addition to reading them from the ordinary linker path.
(edit: turns out I'm wrong about this on Windows)
Native libraries used by JNI can be shipped in the jar files and are read from the classpath, in addition to reading them from the ordinary linker path.
(edit: turns out I'm wrong about this on Windows)
I think the same is with the Python packagers, or C# shadow copy.
Looking at an example of a library that does native binding: https://mvnrepository.com/artifact/com.github.fommil.netlib/...
It appears the artifact is a DLL, and not a JAR. Thus your original question stands.
This way there is no need for extra install, uninstall. Possibly too much over-engineering for full blown product, but if it's something that needs to be run, and updated on tons of machine - not having to deal with extra artifacts might be a win.
I've tried loading dlls from memory (there are several examples on the net) only to understand that there is more to be done (like getting the PDB information correctly loaded, and then some more).