You can set the path to a native library by using an
operating system environment variable or by setting a JVM system property.
If this path is not properly defined, an Unsatisfied Link error can occur
when a Java program makes a native call, but is unable to find the native
library.
Setting the operating system environment variable
Each operating system has a different name for the environment variable to
include native libraries in your path.
AIX® |
LIBPATH |
Linux® |
LD_LIBRARY_PATH |
Solaris™ |
LD_LIBRARY_PATH |
HP-UX®: |
SHLIB_PATH |
Microsoft® Windows® |
PATH |
Setting the Environment Entries from the administrative
console:
- Open Servers > Application Servers >
server_name > Java and Process Management > Process
Definition > Environment Entries > New
- Type the Name and Value for your environment variables:
Example for Microsoft Windows:
Name: PATH
Value: library_path
where library_pathis the path for the native
library
- Apply and save all changes.
- Restart the application server.
Setting the java.library.path JVM system property:
- Open Servers > Application Servers >
server_name > Process Definition > Java Virtual
Machine > Custom Properties > New
- Type the Name and Value for the custom
property:
Name: java.library.path
Value: library_path
where library_path is the path the
native library
- Apply and save all changes.
- Restart the application server.
|