Reputation: 4447
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 JARs. Is there an equivalent for Netbeans or something that works on the command line?
Upvotes: 9
Views: 5505
Reputation:
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
Upvotes: 5
Reputation: 1932
A good command line tool would be Tattletale
You can check other recommendations here: How to Determine which JARs are Used in an Application
Upvotes: 1
Reputation: 1545
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
Upvotes: 0