tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Heusser" <>
Subject How can I modify the java.library.path in Tomcat?
Date Sat, 03 Jun 2006 02:25:24 GMT


I have a web application where I need to load some 3rd party libraries DLLs)
and I would like to have these DLLs in a subdirectory in my app
(webapps/MyApp/WEB-INF/lib). However when I try to do a 'loadLibrary' it
fails to find them. I then noticed that the 'Tomcat/bin' directory is in
this path and if I copy the DLLs in there, then it works fine.


I've tried to set the system property inside my app in the static
initializer of the main class but that doesn't seem to work. I basically
tried to do the following:


            String libPath = System.getProperty("java.library.path");

            String myLibPath = System.getProperty("myapp.lib.path");
//env var set in PC's system variables (WinXP)

            System.setProperty("java.library.path", libPath +
File.pathSeparator + myLibPath);



I also looked through the Tomcat conf files but I couldn't find any place
where I could properly set or override the java.library.path.


Is there a way to set this in Tomcat or will I have to copy the DLLs into
Tomcat's bin directory?






  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message