public static void registerNativePaths(Path... paths) { if (paths == null || paths.length == 0) return; registerNativePaths(Arrays.stream(paths).map(Path::toString).collect(Collectors.toList()).toArray(new String[paths.length])); }
Path tmpPath = Paths.get(System.getProperty("java.io.tmpdir"), "lib", getOSFamily(), mappedLibName); try (OutputStream out = FileUtils.openOutputStream(tmpPath.toFile())) { IOUtils.copy(in, out); registerNativePaths(path); System.loadLibrary(libraryName);
logger.log(Level.FINE, "Register native lib paths on Windows for folder '"+ nativeFolderPath.toString()+"'."); NativeLibraryUtils.registerNativePaths(nativeFolderPath);
logger.log(Level.FINE, "Register native lib paths on Linux for folder '"+ libFolderPath.toString()+"'."); NativeLibraryUtils.registerNativePaths(libFolderPath); logger.log(Level.FINE, "Register jni paths on Linux for folder '"+ nativeFolderPath.toString()+"'."); NativeLibraryUtils.registerNativePaths(nativeFolderPath);