8003562: Provide a command-line tool to find static dependencies

Alan Bateman Alan.Bateman at oracle.com
Wed Nov 28 11:53:31 PST 2012

On 27/11/2012 23:18, Mandy Chung wrote:
> :
> See below for a few sample output.
> Webrev at:
>    http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8003562/
> The implementation classes for jdeps are in the langtools repo along 
> with the com.sun.tools.classfile library.  I'm working on adding more 
> unit tests.  I'd like to get this webrev out to begin the discussion 
> and get review feedback.
Thanks for getting this together.

I suspect you will get a lots of feedback on the output once people get 
a chance to try it out. Personally I think I would print the code source 
against each of the dependence if it's in a JAR file (might be more than 
one). That makes inter-dependencies obvious when giving it a list of JAR 
files. For missing types then I think I would print something like "not 
found" as the code source rather than a series of warnings at the 
beginning. The other way I'd probably use is to just give it the 
application's usual classpath (application and libraries) and have it 
print the dependencies on the platform and other libraries, ie: don't 
print intra-dependencies. I think if there were just the two modes 
-classpath and -d might not be needed. I'm also not sure if -r is 
needed. I think -v is very useful and arguably should be the default 
with a -package option to get more terse output (I don't have strong 
opinion on which should be the default, just good to see that it has both).

I realize the profiles.resources is just temporary but just an FYI that 
there are only 3 profiles proposed at this time: compact1, compact2 and 

Otherwise I think it will be great to have this tool in the JDK, will be 
very useful.


More information about the compiler-dev mailing list