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.
- Alphabetic
- By Inheritance
- NativeLoader
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new NativeLoader(topLevelResourcesPath: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()