Java system load from resources

Java
static {
    System.loadLibrary("resource/path/to/foo"); // no .dll or .so extension!
}
Source

Also in Java: