Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?
I know this is an old one, but if anyone else stumbles upon this, Eclipse does this by itself.
Navigate to Project properties->Java Code Style->Clean Up Select the Eclipse [Built-in] and it does the following:
UCDetector does not help for this : It does not work on JARs. And for classpathHelper, I wan't able to find out an easy way just to list the orphan JARs (BTW, if someone has a tutorial for this, i am interested).
So, if you are also using Maven as I do, I find out this great Maven plugin, and I would like to share this solution with you. Just type :
mvn dependency:analyze
And you will instantly get a list of unused JARs in your dependencies. Very handy !
ClassPathHelper is a good start.
It automatically identifies orphan jars and much more.
The only limitation is with dependencies that are not defined in classes, e.g. in dependency injection framework configuration files.
You also have other options/complements, such as:
You can use one of this plugins: UCDetector or Classpath Helper
I found a very fast and interesting tool to archive this goal:
http://tattletale.jboss.org/
Just unzip the program and run:
java -Xmx512m -jar tattletale.jar ~/myjavaproject/mydistribution output
This will generate a very impressive report with different points (text from their site):