Package org.esa.snap.core.util
Class NativeLibraryUtils
- java.lang.Object
-
- org.esa.snap.core.util.NativeLibraryUtils
-
public class NativeLibraryUtils extends Object
Helper methods for native libraries registration.- Since:
- 8.0.0
-
-
Constructor Summary
Constructors Constructor Description NativeLibraryUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getOSFamily()
static void
loadLibrary(String path, String libraryName)
Loads library either from a JAR archive, or from file system The file from JAR is copied into system temporary directory and then loaded.static void
registerNativePaths(String... paths)
static void
registerNativePaths(Path... paths)
-
-
-
Method Detail
-
registerNativePaths
public static void registerNativePaths(Path... paths)
-
registerNativePaths
public static void registerNativePaths(String... paths)
-
loadLibrary
public static void loadLibrary(String path, String libraryName) throws IOException
Loads library either from a JAR archive, or from file system The file from JAR is copied into system temporary directory and then loaded.- Parameters:
path
- The path from which the load is attemptedlibraryName
- The name of the library to be loaded (without extension)- Throws:
IOException
- If temporary file creation or read/write operation fails
-
getOSFamily
public static String getOSFamily()
-
-