Hi Chris,
On 20.04.2021 16:47, Christopher Schultz wrote:
... cut ...
When bringing non-Java binaries into the picture then they work in the process
environment where
>> e.g. PATH defines which directories are looked up for finding executables
>> (which might be important
>> for some natives) and on Windows DLLs, and in Linux and MacOS shared
>> libraries need to be found by
>> the non-Java native code. Hence the desire to allow setting up the process
>> environment before
>> starting up Tomcat in a simple, but effective way.
>
> You may want to do a Google search for "java.library.path".
have been aware of (and using) "java.library.path" for quite some time, it does
not do for natives
what it does for the JVM. E.g. adding a path via something like
-Djava.library.path="%PATH%;x:\some\path" |
-Djava.library.path="${PATH}:/some/path"
does not change the process environment variable PATH accordingly (adding
"x:\some\path" |
"/some/path" to the PATH environment variable) such that a native library can
issue a command that
will be looked for in addition in "x:\some\path" | "/some/path" (just tested it
again on Windows
with Java 8).
>> However, with CATALINA_OPTS you brought the startup/stop|shutdown/catalina
>> scripts into the picture,
>> which might be a possible solution (though being very wary
>> altering/tampering such fundamental
>> scripts).
>
> I didn't suggest that you modify those scripts. I only suggested that you use
> an environment
> variable that those scripts are aware of.
>
> Typically, admins will create a bin/setenv.sh script which sets all
> environment variables
> necessary for local operation. You could even change the PATH variable -- if
> you really want to do
> that -- there.
Thank you very much for this pointer, seeing "setenv.{sh|bat}" being excercised
in the Tomcat
supplied scripts, if it exists!
---rony
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]