public class NativeLibraryLoader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ALT_LIBRARY_PATH |
static String |
DEFAULT_LIBRARY_PATH |
static String |
DEFAULT_ZOS31_LIBRARY_PATH |
static String |
DEFAULT_ZOS3164_LIBRARY_PATH |
static int |
JNI_API_LEVEL
The required API level of the JNI DLL of FLAM5
|
Constructor and Description |
---|
NativeLibraryLoader() |
Modifier and Type | Method and Description |
---|---|
static String |
getLibraryPath()
Returns the path to the FLAM byte interface JNI DLL
|
static void |
loadLibrary()
Loads the native JNI-based library (flcbytjava) that backs the
functionality of this class.
|
static void |
setLibraryPath(String libraryPath)
Sets the path to the FLAM byte interface JNI DLL.
|
public static final String DEFAULT_LIBRARY_PATH
public static final String DEFAULT_ALT_LIBRARY_PATH
public static final String DEFAULT_ZOS31_LIBRARY_PATH
public static final String DEFAULT_ZOS3164_LIBRARY_PATH
public static final int JNI_API_LEVEL
public static void loadLibrary()
setLibraryPath(String)
, the default library "flcbytjava"
is loaded. If this fails, an attempt is made to load the
library name "libflcbytjava".
On z/OS, if this fails, it is attempted to load the library
"FLCBYTJV" or "FLCBYTJ3" from your STEPLIB, depending on whether
a 31 bit or 64 bit JVM is detected. Running on z/OS in a 64 bit
JVM, the 31 bit FLAM byte interface can be used by loading "FLCBYTJ3".
The library "FLCBYTJV" can only be used in a 31 bit JVM on z/OS.
In both cases, the FLAM load libary must be in the STEPLIB
concatenation of your Java invocation to successfully load the
library. A JCL example can be found in FLAM.JOBLIB(JZOSFCBI) of
your FLAM installation.
If the library is already loaded, this method does nothing.UnsatisfiedLinkError
- if the JNI DLL cannot be loaded or if there is
an API mismatch between Java code and JNI DLLSystem.loadLibrary(String)
public static String getLibraryPath()
public static void setLibraryPath(String libraryPath)
loadLibrary()
) to have an effect.
The library filename must be passed without the file extension.libraryPath
- ath to the FLAM byte interface JNI DLL without file
extension (.dll/.so)System.load(String)