Ryan Ollerenshaw wrote:
I am trying to set up Tomcat 5 on Fedora Core 5 and everything iw
working find but i do not know how to set my classpath when using
tomcat below is a few things that i have tried.
I have found i can use the following code to print out the classpath
that my program is actaully using, the code is:
Get the System Classloader
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();
//Get the URLs
URL urls = ((URLClassLoader)sysClassLoader).getURLs();
for(int i=0; i< urls.length; i++)
and the classpath that is printed is:
But i am not sure where this is getting set, i do have the following
in my /tomcat5/bin/startup.sh
so why is this not my classpath at run time??
Tomcat does all kinds of weird things to the classpath. Any jars your
webapp needs need to be in its WEB-INF/lib directory.