Sathesh Sathesh - 2 months ago 28x
Java Question

Including external jar in Tomcat ClassPath

In Tomcat I want to use a jar inside a web application. The jar file will exist outside of the Tomcat directory.

To include the jar file in tomcat classpath, I modified the TomcatHome/conf/ to include the absolute path of my jar file like,


as per the suggestion given in link,

But it throws the error,


I have also tried ,



None of them seem to work :(

If I try placing the jar inside tomcat/lib it seem to work. But I am not allowed to do that.

Please help me out with this issue as I have implementation the next week..


I figured myself how to add the classpath for tomcat. Instead of editing, just create a "" in the Tomcat Bin directory with the classpath,



I just checked the in Tomcat/bin and these classpath variable will be set while setting the bootstrap as the classpath.