Rony,

On 4/19/21 08:54, Rony G. Flatscher (Apache) wrote:
Java based web servers are - of course - focused on the Java programming 
language and the Java
runtime environment.

Nevertheless, there are situations where non-Java binaries may become resources 
that may prove
helpful in a Java environment.

As Java allows interfacing with non-Java binaries via JNI (Java native 
interface) it may make sense
to support native binaries in Tomcat as well.

Use case in question would be to make non-Java programming languages with JNI 
interfaces available
without having to install such programming languages globally on the server.  
There may be other use
cases as well (e.g. non-public security libraries).

In order to make this as simple as possible and yet allow for the Tomcat setup 
to be as secure as
setting up shared Java libraries, how about allowing for the following:

   * allow optional "$CATALINA_HOME/natives/bin" and 
"$CATALINA_HOME/natives/lib" directories into
     which the (Tomcat shared) binaries can be placed,

Is there anything wrong with using CATALINA_OPTS to set java.library.path to some arbitrary value? I always have mine set to CATALINA_BASE/lib

   * if "$CATALINA_HOME/natives/bin" exists have the PATH environment variable 
prepended with
     "$CATALINA_HOME/natives/bin" before Tomcat gets started up,

Note that java.library.path (a system property) would be better than changing the PATH environment variable.

   * if "$CATALINA_HOME/natives/lib" exists do whatever is needed for Linux and 
MacOS systems for the
     process to become able to recognize the shared native libraries there,

Nothing further is needed after java.library.path is set.

   * if there are jar files (possibly with JNI interfaces) in 
"$CATALINA_HOME/natives/lib" then add
     them to Tomcat (like the jar files in "$CATALINA_HOME/lib").

If you use CATALINA_BASE/lib, then this is already done for you.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to