Sajee
Sajee

Reputation: 4447

netbeans: how to determine unused JARs?

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

Answers (3)

user330315
user330315

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

Aleks Felipe
Aleks Felipe

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

Kajetan Abt
Kajetan Abt

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

Related Questions