Monday, February 13, 2006

Java: Extending classpath in Tomcat 5.5.x

According to the documentation you can add locations/jars to your classpath using the CLASSPATH system variable in windows. I have discovered another way to do this. Just open the catalina.properties file in the conf directory. This should read:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
Changing the line to:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar,c:/test/foo.jar
Will extend the shared classpath with foo.jar.

1 comment:

AndreAgosto said...

i need to set a classpath for a folder resources, but your manner
doesn't work for this purpose. Do you know why? thanks.