in shared/java/impl/Library.java [113:134]
public static File _extract(String resourcePath, String fileName, File tempDir) {
File file;
URL url = _nativeLibraryClass.getResource(resourcePath + fileName);
if (url == null) {
file = new File(fileName);
if (!file.exists())
throw new IllegalArgumentException("Library file " + fileName + " not found in " + resourcePath);
} else if ("file".equals(url.getProtocol())) {
file = new File(url.toURI());
} else {
file = new File(tempDir, fileName);
if (!file.exists()) {
if (!tempDir.exists())
tempDir.mkdirs();
try (InputStream is = url.openStream()) {
Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
}
}
Log.debug("Loading " + file);
return file;
}