Packages

class NativeLoader extends Serializable

A helper class for loading native libraries from Java

Some Java interfaces depend on native libraries that need to be loaded at runtime. This class is a simple utility that can load the native libraries from a jar in one of two ways:

  • By name: If a particular native library is needed, it will extract it to a temp folder (along with its dependencies) and load it from there.
  • All libraries: all libraries will be extracted to a temp folder and the libraries in the load manifest are loaded in the order provided, or loaded in the order specified in the native manifest if no load manifest is provided.

The jar with the native libraries must contain a file name 'NATIVE_MANIFEST' that lists all native files (one per line, full name) to be extracted. If the loadAll() method is used, the libraries will be loaded in the order specified in the manifest. The native libraries should be in folders describing the OS they run on: linux, windows, mac.

Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NativeLoader
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NativeLoader(topLevelResourcesPath: String)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def loadLibraryByName(libName: String): Unit

    Loads a named native library from the jar file

    Loads a named native library from the jar file

    This method will first try to load the library from java.library.path system property. Only if that fails, the named native library and its dependencies will be extracted to a temporary folder and loaded from there.

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped