How can I visualize jar (not plugin) dependencies?

2019-01-17 08:23发布

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.

9条回答
放荡不羁爱自由
2楼-- · 2019-01-17 09:04

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

See the screenshot below or view it larger.

alt text

查看更多
乱世女痞
3楼-- · 2019-01-17 09:06

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.

查看更多
Evening l夕情丶
4楼-- · 2019-01-17 09:07

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
查看更多
唯我独甜
5楼-- · 2019-01-17 09:14

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.

查看更多
对你真心纯属浪费
6楼-- · 2019-01-17 09:20

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
查看更多
贪生不怕死
7楼-- · 2019-01-17 09:20
登录 后发表回答