Meaningless Drivel is fun!
The moose likes Testing and the fly likes Finding unused classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Finding unused classes" Watch "Finding unused classes" New topic

Finding unused classes

Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Does anybody know of a static analysis tool that will allow me to find classes that are not used. I've looked at JProbe, and that doesn't seem to have this ability. I've also looked at PMD, which looks to have alot of neat static analysis tools, but they are all class level rather than project level.

Working on a rather large project. Have gone through a number of redesigns/refactors. We know there are a fair number of classes that are not used anymore, but going one by one and checking for dependencies is a tedious operation that we really don't have time for.

Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
I have heard that IntelliJ IDEA has the ability I'm looking for. Does anybody have any experience with this?

It's to large for me to download at work, I'll have to wait until I get home, then bring it in, but It'd be nice to hear if it will do the trick before I go through the effort.

Also we are using eclipse for development, if IDEA has this ability I'd be surprised if somebody hasn't written an eclipse plugin to do it also, but I sure can't find it.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Vote for

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

I guess you would have found it by now.
In case anyone else is looking for the same information, Idea can do that.
Choose Analyze -> Inspect Code, and set your criteria for code inspection.


The future is here. It's just not evenly distributed yet. - William Gibson
Sonny Gill LinkedIn
I agree. Here's the link:
subject: Finding unused classes
It's not a secret anymore!