Does ldd of your .so show dependencies? Where are they? Generally, the Java classes with the native methods have to be in a classloader other than webapp to get useful results.
-----Original Message----- From: vaheesan selvarajah [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 1:03 PM To: [email protected] Subject: JNI loading problem Hi folks, I am trying to load a simple JNI based .so lib file with Tomcat 5.5.4.(on linux) I am trying to load the .so file within the JSP page. I am not sure if this is allowed. I have tried all the following methods.. 1. putting the .so file in JAVA_HOME//jre/lib/i386/ 2. setting the LD_LIBRARY_PATH to where my lib is and exporting it 3. inside the catelina.sh file added an extra -Djava.library.path=mylibpath Inside the JSP i tried the following options... 1. try { //System.loadLibrary("AriaJava"); // the name of the file is libAriaJava.so } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load.\n" + e); } 2. try { System.load( "/home/path_to_lib/libAriaJava.so"); } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load.\n" + e); } in all these trials it fails with unsatisfied link error !! Any help is appreciated !! r -Vaheesan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
