Over the course of developing my Spring MVC project, I've accumulated an overabundance of JARs, many of which I suspect are no longer necessary.
I see that Eclipse has a plugin that can help find unused JAR s. Is there an equivalent for Netbeans or something that works on the command line?
I don't think this can be done in a reliable way.
What if you have classes that are loaded via reflection? What if you have classes that are only referenced from within a Spring XML file?
They will never show up in the Java source code
A good command line tool would be Tattletale
You can check other recommendations here: How to Determine which JARs are Used in an Application
I believe Netbeans has an inbuilt function for that? "Remove unused dependencies" it is called iirc.
Well, that works for a single file. If you want more than one, 6.8 should add that according to Organising Imports in NetBeans
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.