I need to clean a web application and remove the unused jars. The problem is I’m not familiar with the web application. Is there a way to check the list of jars being used/accessed by Tomcat?
I tried to used Window's Process Explorer to view the jars being accessed by javaw.exe but it seems that Tomcat loads all the jars regardless if its being used or not once the web application is accessed. Is it possible to set Tomcat to load jars only if they’re needed?
The web application is relatively new and is not yet on production so it’s best if we could clean it while it’s still early.
Thank you!
I would approach this problem independent of Tomcat since it seems that you’re mainly interested in your web application’s dependencies. While there are a number of tools to analyze JAR dependencies I recommend Tattletale from JBoss. It provides a well-organized report that provides a number of insights into an application. Check out the sample report to see if it fits your needs.