Class NativeLibrary


  • public class NativeLibrary
    extends java.lang.Object
    Helper class to load native library (.dll, .so or .dylib) stored in Jar.

    Copies native library to users temporary folder before loading it.

    Since:
    1.1
    • Constructor Summary

      Constructors 
      Constructor Description
      NativeLibrary​(java.lang.String libraryName, java.lang.ClassLoader classLoader, boolean supported)
      Load native library from given classloader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isLoaded()
      Returns whether the native library is loaded.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NativeLibrary

        public NativeLibrary​(java.lang.String libraryName,
                             java.lang.ClassLoader classLoader,
                             boolean supported)
        Load native library from given classloader.
        Parameters:
        libraryName - resource name of the native library (without "lib" prefix and without extension)
        classLoader - the classloader used to locate the library
        supported - whether the native library is supported on the current platform
    • Method Detail

      • isLoaded

        public boolean isLoaded()
        Returns whether the native library is loaded.

        Returns false if not supported on current platform as specified in constructor or if loading failed.