16

I'm looking for a tool that will show me a graph of JAR dependencies in my Java project based on static analysis of the compiled byte code. Specifically, I'm trying to figure out if there are unused JARs that I can eliminate, but I'd also just like to get a better understanding of the dependencies that exist. I'm not using Maven.

Dependency Finder comes close, but it deals in packages rather than JARs and there doesn't seem to be any way to query it for JARs that have no dependents. Any recommendations? Free and open source preferred. Thanks!

Rob H
  • 14,502
  • 8
  • 42
  • 45

6 Answers6

8

See also JarAnalyzer which claims to:

... traverse through a directory, parse each of the jar files in that directory, and identify the dependencies between the jar files.

David J. Liszewski
  • 10,959
  • 6
  • 44
  • 57
7

JBoss Tattletale does exactly what I need.

Rob H
  • 14,502
  • 8
  • 42
  • 45
2

You can try this tool that displays the public resources of a library and calculates a ratio of usage between two Jars: http://trimatek.org/deep

Martín
  • 29
  • 2
2

Take a look on JDepend.

JDepend traverses Java class file directories and generates design quality metrics for each Java package. JDepend allows you to automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to manage package dependencies effectively.

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
AlexR
  • 114,158
  • 16
  • 130
  • 208
  • 2
    I believe JDepend may not really be useful here. It'll show you only dependencies between packages, not JARs. Hence, if you have the same package in a few JARs they will add some mess to your profile. – Przemek Kryger Dec 01 '10 at 18:32
  • I agree with Przemek. JDepend is fantastic, but JarAnalyzer is what's needed here. – Chris Dolan Dec 02 '10 at 05:29
1

You can use JArchitect is a static analysis tool to improve java code quality and it's free for opensource contributors and universities

Dane
  • 161
  • 5
0

Or Maven. Elcipse plugin shows it very nicely. Even shows dependencies on the dependencies.

aksarben
  • 588
  • 3
  • 7