How can I visualize jar (not plugin) dependencies?

后端 未结 9 636
情深已故
情深已故 2020-12-08 17:40

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 he

相关标签:
9条回答
  • 2020-12-08 17:55

    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
    
    0 讨论(0)
  • 2020-12-08 17:55

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

    I have found it very useful for tidying up jars.

    0 讨论(0)
  • 2020-12-08 18:01

    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.

    0 讨论(0)
  • 2020-12-08 18:07

    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.

    0 讨论(0)
  • 2020-12-08 18:08

    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

    0 讨论(0)
  • 2020-12-08 18:08

    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.

    0 讨论(0)
提交回复
热议问题