Setting java.library.path for Java Agent

I’ve an application using third party java APIs that require us to set the java.library.path to the directory where the libs are installed. When running as a standalone application with “java -Djava.library.path=… …”, the application works fine.

How can we make it run within a Java Agent? Is is possible for us to set the java.library.path system property for Domino’s jvm?

Thanks.

Subject: Setting java.library.path for Java Agent

Either you import/include/attach your jar files in the Java agent, or specify these jar files in the NOTES.INI using JavaUserClasses parameter. The Admin Help has more detail information.

Subject: RE: Setting java.library.path for Java Agent

Hi, we have already attached all the jar files in the Java Agent when we encounter the error. We then proceed to specify the JavaUserClasses in the NOTES.INI but we encounter java.lang.NoClassDefFoundError, which is even worst.

JavaUserClasses=/usr/mqm/java/lib:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/l

ib/com.ibm.mqbind.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar:/usr/mqm/java/lib/connec

tor.jar:/usr/mqm/java/lib/fscontext.jar:/usr/mqm/java/lib/jms.jar:/usr/mqm/java/li

b/jndi.jar:/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/ldap.jar:/usr/mqm/java/lib/

providerutil.jar

Does anyone have a checklist of what parameters need to set on the AIX and/or Domino?

Thanks.

Subject: RE: Setting java.library.path for Java Agent

There is a long standing bug on Notes/Domino (last time I checked anyway) that notes.ini variables can not exceed 255 byes, the value you have specified there is 344 characters long. Trim it down somehow.

–Joe

Joseph Millar

Principal Software Engineer

Brightline Technology

Subject: Setting java.library.path for Java Agent

There is no external way to affect the value of java.library.path in the JVM in Notes/Domino. However, if you inspect the value you will see there are some default values, simply place your native libs in these directories, or in one of the directories in sun.boot.library.path.

–Joe

Joseph Millar

Principal Software Engineer

Brightline Technology