Setting the path to native libraries in V5.0 and V5.1
 Technote (troubleshooting)
 
Problem(Abstract)
IBM® WebSphere® Application Server V5.0 and V5.1 releases support setting paths to native libraries. This can be accomplished by setting an operating system environment variable or by setting a Java™ virtual machine (JVM™) system property.

A java.lang UnsatisfiedLinkError can occur from any application, if the native library that the application needs is not found in the library path.
 
Cause
A nonexistent or improperly set path to native libraries that the application needs to work properly.
 
Resolving the problem
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:
  1. Open Servers > Application Servers > server_name > Java and Process Management > Process Definition > Environment Entries > New
  2. 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
  3. Apply and save all changes.
  4. Restart the application server.

Setting the java.library.path JVM system property:
  1. Open Servers > Application Servers > server_name > Process Definition > Java Virtual Machine > Custom Properties > New
  2. 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
  3. Apply and save all changes.
  4. Restart the application server.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s): Windows
Software version: 5.1
Software edition:
Reference #: 1169708
IBM Group: Software Group
Modified date: Jun 30, 2005