Package info.freelibrary.util
Class NativeLibraryLoader
- java.lang.Object
-
- info.freelibrary.util.NativeLibraryLoader
-
public final class NativeLibraryLoader extends Object
Utility class to load a native library that lives in the current classpath.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NativeLibraryLoader.Architecture
Possible architectures of native libraries.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NativeLibraryLoader.Architecture
getArchitecture()
Gets the architecture of the machine running the JVM.static String
getPlatformLibraryName(String aLibraryName)
Gets the library name for the current platform.static void
load(String aNativeLibrary)
Loads a native library from the 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
-
-