> From: soulboy [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat JNI Netbeans
> 
> Does that work with JNI ?

JNI has nothing to do with Tomcat, but rather with the JVM you're using.
For Sun-based JVMs, the location of native libraries must be specified
via the java.library.path system property.  When running on UNIX/Linux
platforms, the default value of that property is taken from the
LD_LIBRARY_PATH environment variable; for Windows, it comes from PATH.
The system property can alternatively be set directly on the launcher
command line.

Tomcat 6 uses a much simplified classloader hierarchy both to reduce
overhead and make certain operations easier, such as direct referencing
of Tomcat-specific classes.  Changing the classloader hierarchy to be
compatible with 5.5 or earlier is a step backwards.

> All the instructions for JNI with Tomcat say use
> $CATALINA_HOME/shared/lib.

What instructions are those?  If they're coming from some 3rd party,
they're out of date (not unusual).

> Also I would prefer to keep my jars separately 
> as its easier to keep track of things.

Which is why the servlet spec recommends that webapps be implemented
independently, and jars should go into WEB-INF/lib of each webapp, even
if that means duplicating them.  Since you're insisting on using JNI
(thereby guaranteeing your app is not portable), you're stuck with the
Java restriction that a native library can only be loaded once,
regardless of the number of classloaders that want to use it.  I'd still
put the common jar in Tomcat's lib directory, since that's simple and
straightforward.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to