Jacob Schoen
Jacob Schoen

Reputation: 14212

Java library inspector?

I am currently working on a mantenance project that is written in Java. We are currently working to clean up the code some and try to provide a little more organization to the project overall.

The list of libraries that are included in the build have grown long, and honestly no one remains that knows/remembers what each library is used for or why? So I am looking for a tool that would be able to essentially find where the library is used in the code. Essentially like a find usage function in an IDE has for functions.

Does such a tool exist? I am curently using Netbeans and as mentioned our code is in java.

I know I could remove each library and compile the project for each library to find the usages, but it just seems there should be a better way. Any ideas?

Upvotes: 2

Views: 196

Answers (4)

Thomas
Thomas

Reputation: 182000

You could let Eclipse remove unnecessary imports for you. Then simply search through the code for imports relating to a specific library's package name.

Upvotes: 0

Nick Fortescue
Nick Fortescue

Reputation: 44183

I haven't used it for a few years but I remember that JDepend was useful when I was in a similar situation.

Upvotes: 1

Steven Levine
Steven Levine

Reputation: 3675

Try using jarjar. It has a command line interface that will analyze your dependency tree.

Upvotes: 1

Michael Myers
Michael Myers

Reputation: 192015

Since you're using NetBeans, I suggest the SQE plugin, which includes Dependency Finder. (And if you weren't already using FindBugs, this is a good time to start.)

Upvotes: 1

Related Questions