You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by vaheesan selvarajah <va...@gmail.com> on 2005/02/23 19:02:57 UTC

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org