Programming Guides › Programming Guide for Java › Agent API › Implement the JNI Java Agent API
Implement the JNI Java Agent API
Applications that are built using the JNI Java AgentAPI either directly or indirectly (through another agent) are insulated from underlying implementation details, including:
- User namespaces, such as LDAP directories, SQL databases, or NT domains
- Authentication methods as simple as username/password or as complex as PKI systems
- Authorizations based on group membership or individual profile data
Additional benefits provided by the Java Agent API include full session management support, automatic encryption key rollover, and real-time policy updates.
To implement the JNI Java Agent API
- Review the required software as listed in the accompanying release notes.
- Review the sample code.
- Write source code for your client application.
- Ensure that your system can find the JNI support library when the Java Virtual Machine (JVM) is invoked, as follows:
- On Windows: Change PATH to include the following, so that smjavaagentapi.dll can be found:
<install_path>\sdk\bin
- On Solaris: Change LD_LIBRARY_PATH to include the following, so that libsmjavaagentapi.so can be found:
<install_path>/sdk/bin
- On AIX: Change LIBPATH to include the following, so that libsmjavaagentapi.so can be found:
<install_path>/sdk/bin
- On Linux: Change LD_LIBRARY_PATH to include the following, so that libsmjavaagentapi.so can be found:
<install_path>/sdk/bin
Note: Java agents on Linux require Java SDK v 1.3.1.
- On HP-UX 11: Change SHLIB_PATH to include the following, so that libsmjavaagentapi.sl can be found:
<install_path>/sdk/bin
Note: The Java Agent API is not available for HP10.
- Ensure that SiteMinder can find the JNI Java AgentAPI JAR file when you compile or run an agent that uses the Java Agent API. The JAR file, smjavaagentapi.jar, is stored in the following locations:
<install_path>\sdk\java
<install_path>/sdk/java
Add smjavaagentapi.jar to your CLASSPATH setting. When compiling, you can use the -classpath switch.
- Compile the Java Agent API application using javac.
For an example, see java-build.bat or java-build.sh in the sample directory smjavaagentapi.
- Configure the Policy Server to use the Java Agent API application.
- Run the application.
For an example, see java-run.bat or java-run.sh in the sample directory smjavaagentapi.