Determining dependencies between jars
2 posts in topic
Flat View  Flat View

Posted By:   s_sunda
Posted On:   Wednesday, May 16, 2001 05:50 AM

Is there any tool that helps determine dependencies between various jars in a given release of a software product. I am on a project where there are so many different jars. I am wondering if there is any mechanism (or tool) to help build a dependency tree so that one would exactly know which components are affected when there is a new version of a given jar in this tree.

Re: Determining dependencies between jars

Posted By:   McClain_Looney  
Posted On:   Friday, October 26, 2001 05:46 PM

The Jax project from does a _really_ good job of figuring this out for you. it also optimizes, inlines, obfuscates, transforms and other useful functions. there is currently a commerical version available for 1k or so, though as far as i know the old free version is still around.

warning though: it's _very_ fiddly and tends to break things like serialization.

Re: Determining dependencies between jars

Posted By:   Christopher_Schultz  
Posted On:   Wednesday, May 16, 2001 07:53 AM

I'm not sure if there's a tool out there that could do what you want, but here's a possible solution to home-brew:

Write a program that opens up each class file in a JAR and reads the "Class" references in each class's constant pool. Then, you've got a list of classes and their dependencies.

Now, you can search through any JAR file to see if any of those dependent classes are present in the JAR file.

You can probably optimize this by ignoring any class references that start with 'java/', since it is likely that most files will have dozens of references to those classes, and they won't be of interest to you.

(I might be persuaded to write such a tool, if there was significant interest).

About | Sitemap | Contact