I have a custom jar file in the tomcat lib/ folder. As per my knowledge, any jar file in this folder will be loaded on startup.
Is there anyway I can check if a particular jar file is loaded or not?
I'm running tomcat-6.0.35.A on unix rhel5.
I have a custom jar file in the tomcat lib/ folder. As per my knowledge, any jar file in this folder will be loaded on startup.
Is there anyway I can check if a particular jar file is loaded or not?
I'm running tomcat-6.0.35.A on unix rhel5.
I think I have seen which jars are open on startup in one of Tomcat log files. If not I could think about two possible alternatives:
Jars aren't really "loaded on startup". But Tomcat's system class loader is loading classes from those jars. You can check if some class from the jar is available either:
getClass().getClassloader().loadClass(className)
getClass().getResource("/" + className.replace('.', '/') + ".class")
In second case you should have name or your jar file in the url returned by getResource()
.