Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?
Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars?
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:
In the Maven and Gradle projects you can use those plugins to identify unused dependencies.
Use this in the pom.xml file plugin.
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</build>
this will give as output. In this case we add commons-collections dependency to pom.xml, but do not use in the code.

Use this in the build.gradle file plugin.
plugins {
id "ca.cutterslade.analyze" version "1.7.1"
}
Using legacy plugin application:
this will give as output. In this case we add dependencies unusedDeclaredArtifacts to gradlefile, but do not use in the code.
