tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: using shared objects from tomcat
Date Thu, 10 Feb 2005 02:35:06 GMT
Andreas,

You need to apply the javap command to your third-party code.

Perhaps first, you need to read the Sun JNI book.

There are two levels of naming. First, when some Java code calls
System.loadLibrary("foo"), the JVM will look for libfoo.so in
java.library.path.

Then, unless the library manually registers native function, the JVM
will dlsym for functions based on the fully-packaged-name of the classes
containing the native functions. The test application's package doesn't
matter. The classes with native methods matter. 

-----Original Message-----
From: Andreas Andersson [mailto:andreas@travelstart.se] 
Sent: Wednesday, February 09, 2005 3:49 AM
To: Tomcat Users List
Subject: Re: using shared objects from tomcat

Benson Margulies wrote:

> -- Tomcat can't 'ignore' LD_ environment variables. They control how
> ld.so loads the JVM into the process address space and links it. You
put
> env settings in bin/setenv.sh. You will need such a setting for
> LD_LIBRARY_PATH, at least.

Thanks! The LD_DEBUG environment variable told me tomcat was looking for

the wrong .so-file. Apperently it's looking for the file including the 
package structure Java_com_mycompany_myClass_myLib instead of myLib. The

test applications has no package (except the default package) and tomcat

on windows seams to ignore them.

So, I'm off to relink the .so with a packagestructure (thats my next 
problem :).

Thanks for the help!


-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message