1

How do I find unused Java classes and JSP files from a project?

I am using Eclipse and Mercurial as the source control system.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ebbu Abraham
  • 2,036
  • 5
  • 22
  • 30
  • I don't think this has anything to do with Mercurial? Please remove the tag if you agree, or expand the question to explain where Mercurial fits into this. Thanks! – Martin Geisler Apr 23 '12 at 13:09

3 Answers3

3

I believe CodePro will do what you want.

Also a quick way of identifying this if only on a few files is right click the file and select 'References' then workspace or project.

dapperwaterbuffalo
  • 2,672
  • 5
  • 35
  • 48
1

ProGuard will do this as part of its "listing dead code" feature. The examples page shows you exactly how to do it.

Louis Wasserman
  • 191,574
  • 25
  • 345
  • 413
-2

It could be approached for an unused class in projects. See how Eclipse marks the Eclipse unused classes as yellow. As it is open source, it is easily available.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
RTA
  • 1,251
  • 2
  • 14
  • 33