public final class LibUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LibUtils.ARCHType
Enumeration of common CPU architectures.
|
static class |
LibUtils.OSType
Enumeration of common operating systems, independent of version
or architecture.
|
Modifier and Type | Method and Description |
---|---|
static LibUtils.ARCHType |
calculateArch()
Calculates the current ARCHType
|
static LibUtils.OSType |
calculateOS()
Calculates the current OSType
|
static String |
createLibName(String baseName)
Creates the name for the native library with the given base
name for the current operating system and architecture.
|
static void |
loadLibrary(String baseName)
Loads the specified library.
|
public static void loadLibrary(String baseName)
createLibName(String)
with the given argument. The method will attempt to load
the library as a as a resource (for usage within a JAR),
and, if this fails, using the usual System.loadLibrary
call.baseName
- The base name of the libraryUnsatisfiedLinkError
- if the native library
could not be loaded.public static String createLibName(String baseName)
baseName
- The base name of the librarypublic static LibUtils.OSType calculateOS()
public static LibUtils.ARCHType calculateArch()
Copyright © 2014. All Rights Reserved.