Class NativeLibraryLoader


  • public final class NativeLibraryLoader
    extends Object
    Utility class to load a native library that lives in the current classpath.
    • Method Detail

      • load

        public static void load​(String aNativeLibrary)
                         throws IOException
        Loads a native library from the classpath.
        Parameters:
        aNativeLibrary - A native library to load from the classpath
        Throws:
        IOException - If there is trouble reading from the Jar file or file system
      • getArchitecture

        public static NativeLibraryLoader.Architecture getArchitecture()
        Gets the architecture of the machine running the JVM.
        Returns:
        The architecture of the machine running the JVM
      • getPlatformLibraryName

        public static String getPlatformLibraryName​(String aLibraryName)
        Gets the library name for the current platform.
        Parameters:
        aLibraryName - The platform-independent library name
        Returns:
        The library name for the current platform