My configuration is Tomcat 4.1.24 running on a Red Hat Linux 7.3 system. I
am starting and stopping Tomcat as the root user via the ./bin/startup.sh
and ./bin/shutdown.sh scripts.
 
I am trying to tie into a service that I am creating a 3rd party component
that does some native calls from Java to a C++ library that are bundled into
an accompanying .so library.
 
I am having trouble getting Tomcat to find the libXXXX.so unless I put the
file in the directory that I startup Tomcat from.  So depending which
directory I startup Tomcat from I, either it works or I get a log entry in
the catalina.out saying that it "Failed to load Can't load library" for the
libXXXX.so with the path being the directory where Tomcat has been started
from.
 
I tried putting the shared object file into /usr/local/lib.  This did not
work.
 
I have tried adding the directory that the shared object file exists into
LD_LIBRARY_PATH in the startup.sh script file.  This did not work.
 
I also tried putting the path to the shared object file into the
/etc/ld.so.conf.  This also did not work.
 
How can I define a path for Tomcat to use so my application is not prone to
requiring the shared object file exist in the directory that the startup.sh
script is run from?
 
--mark 

Reply via email to