tomcat-users mailing list archives

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

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 in

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 [] 
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
> loads the JVM into the process address space and links it. You
> env settings in bin/ 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

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message