Class NativeLibraryUtils


  • public class NativeLibraryUtils
    extends Object
    Helper methods for native libraries registration.
    Since:
    8.0.0
    • Constructor Detail

      • NativeLibraryUtils

        public NativeLibraryUtils()
    • 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 attempted
        libraryName - 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()