Technical question about the Java Dependency Analysis Tool
Mandy Chung
mandy.chung at oracle.com
Tue Nov 10 15:53:34 UTC 2015
jdeps already has the option finding the JAR files needed to compile A.jar.
There is a new jdeps option added to Jigsaw EA build [1] to make this easier:
$ jdeps -s -ct -R -cp lib/* A.jar
This will transitively find all dependencies from the references in A.jar and shows the summary of the JAR-level dependencies. jdeps -dotoutput option outputs the dependencies in a DOT file that you can generate the DOT graph.
You can use idk 9 jdeps —include option which analyzes all JAR files in lib directory
$ jdeps —dotoutput dotfiles —include “.*” -cp lib/* A.jar
Mandy
[1] http://openjdk.java.net/projects/jigsaw/ea
> On Nov 9, 2015, at 9:26 PM, Richard Callahan <richard at lucentsky.com> wrote:
>
> Hi,
>
> I have a specific question about the output from the Java Dependency Analysis Tool (JDeps), released with Open JDK 8. Thank you very much for such a marvelous tool!
>
> I am parsing the output from JDeps with the "-v" flag set, such that a call to JDeps produces all class-level dependencies among and within a set of JAR files in a directory specified by the user. Consider a directed graph G constructed from the JDeps output, with the vertices representing nodes in the graph and the edges representing dependencies among the classes as specified in the JDeps output. My question is, if a specific JAR file in the directory (call it A.jar) can compile using OpenJDK with the other JAR files in the directory designated as dependencies, then does there always exist at least one subgraph G' of G that corresponds to the dependency relationships that would be actually used by a Java compiler to compile A.jar? If the answer is "yes," then I believe I should be able to recover that graph by starting with the set of classes in A.jar and then constructing the subgraph G' in a manner similar to that used by a depth-first search.
>
> Thank you for your time, I recognize it is valuable.
>
> Best,
>
> Richard
More information about the jigsaw-dev
mailing list