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,030
  • 21
  • 100
  • 124
Ebbu Abraham
  • 2,026
  • 5
  • 22
  • 30

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.

Joe
  • 2,590
  • 5
  • 34
  • 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
  • 182,351
  • 25
  • 326
  • 397
-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,030
  • 21
  • 100
  • 124
RTA
  • 1,231
  • 2
  • 14
  • 32