How can I visualize jar (not plugin) dependencies?
Asked Answered
D

9

10

I am currently refactoring a large Java application. I have split up one of the central (Eclipse) projects into about 30 individual "components", however they are still heavily inter-dependent. In order to get a better idea of what depends on what I am looking for some way to graph the compile time dependencies.

All tools I have found so far are capable of graphing package or class dependencies or the dependencies between Eclipse plugins, however what I have in mind should just take a look at the classpath settings for each Eclipse project and build a coarser grained graph from that.

Later I will then go deeper, however right now this would just mean I would not be able to see the forest for all of the trees.

Durant answered 9/6, 2009 at 19:36 Comment(0)
P
3

Structure101 is capable of visualizing class and method JAR level dependencies in Jboss 5.

See the screenshot below or view it larger.

alt text

Pneumatic answered 22/7, 2009 at 17:10 Comment(1)
the picture links are deadTutt
D
8

Check out JBoss Tattletale. It might not do all you ask but it's worth checking out. It's still relatively new though.

The tool will provide you with reports that can help you

  • Identify dependencies between JAR files
  • Find missing classes from the classpath
  • Spot if a class is located in multiple JAR files
  • Spot if the same JAR file is located in multiple locations
  • With a list of what each JAR file requires and provides
  • Verify the SerialVersionUID of a class
  • Find similar JAR files that have different version numbers
  • Find JAR files without a version number
  • Locate a class in a JAR file
  • Get the OSGi status of your project
  • Remove black listed API usage
Dearly answered 9/6, 2009 at 19:59 Comment(0)
S
3

One tool that I believe would do what you want is Understand. It's not free, but you can download a free trial edition before investing any money into it.

Smalto answered 9/6, 2009 at 19:48 Comment(0)
B
3

Take a look at Dependency Finder

Biblioclast answered 10/6, 2009 at 3:2 Comment(0)
P
3

Structure101 is capable of visualizing class and method JAR level dependencies in Jboss 5.

See the screenshot below or view it larger.

alt text

Pneumatic answered 22/7, 2009 at 17:10 Comment(1)
the picture links are deadTutt
B
2

I am not sure if there is a(n Eclipse) classpath analysis tool.
May be Understand mentioned by MattK can help.

The closest I would pick amongst all the static code analysis tool referenced here would be JarAnalyzer (no graph though), able to detect "Physical dependencies" amongst jars.

Bots answered 9/6, 2009 at 19:58 Comment(0)
S
2

Sounds like a use case for Degraph. It analyzes a bunch of class files and jar's, and visualizes the dependencies.

What makes it suitable for your usecase (I think) is the possibility to define arbitrary groups of classes to be bundled together. So you can reproduce your jar structure, seeing dependencies, especially cyclic dependencies.

You can unfold the groups to see their contained classes or collapse them to simplify the view.

For a quick impression what is possible, take a look at the Degraph Examples.

Example for Log4j:

Log4J dependencies

Socialism answered 26/3, 2013 at 14:9 Comment(0)
Q
2

JDeps is already included in the JDK, and shows JAR dependencies. For example:

jdeps -R -cp "my\jar\dir\*;my\other\jar\dir\*" my\classes\dir
Quietly answered 25/11, 2015 at 13:21 Comment(0)
I
1

Check out Class Dependency Analyzer (CDA): http://www.dependency-analyzer.org/

I have found it very useful for tidying up jars.

Iridaceous answered 28/10, 2012 at 14:9 Comment(0)
D
0

for the record (and for improving this knowledge base), I found Shrimp very helpful: http://www.thechiselgroup.org/shrimp

Shrimp-Visualization

Also, for easy dependency-checking, Byecycle is worth a try, but seems not to be updated anymore: Byecycle

Both tools also offer Eclipse integration.

Decima answered 9/9, 2010 at 15:6 Comment(2)
Shrimp project page says its retried. The Byecycle link is broken.Kela
@Kela actually nowadays I'm quite happy with IntelliJ's built in diagrams for (e.g. class and Maven) dependencies...Decima

© 2022 - 2024 — McMap. All rights reserved.