Embedding and loading a JNI library from a jar
When I searched for ways to load a JNI library from a jar there were numerous hints of how to do it, but no code that I could find. So here’s my solution:
import java.net.URL; import java.util.zip.ZipFile; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream;
public abstract class UnixDomainSocket {
static { try { // get the class object for this class, and get the location [...]