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

Mandy Chung mandy.chung at
Tue Dec 18 15:12:39 PST 2012

Alan, Ulf,

I updated the jdeps CLI per the discussion we had.

$ jdeps --help
Usage: jdeps <options> <classes...>
where <classes> can be a pathname to a .class file, a directory, a JAR file,
or a fully-qualified classname or wildcard "*".  Possible options include:
   -s         --summary                 Print dependency summary only
   -v         --verbose                 Print additional information
   -V <level> --verbose-level=<level>   Print package-level or 
class-level dependencies
                                        Valid levels are: "package" and 
   -c <path>  --classpath=<path>        Specify where to find class files
   -p <pkg name> --package=<pkg name>   Restrict analysis to classes in 
this package
                                        (may be given multiple times)
   -e <regex> --regex=<regex>           Restrict analysis to packages 
matching pattern
                                        (-p and -e are exclusive)
   -P         --profile                 Show profile or the file 
containing a package
   -R         --recursive               Recursively traverse all 
              --version                 Version information

Updated webrev:

jdeps only support GNU-style options.  I added java.util.function
and com.sun.source.doctree in the  I'll replace
it to use the proper javac API to work with profiles next.  I
caught a typo 'com.sunsource.doctree' (missing dot) in NON_CORE_PKGS.gmk
and I fix that in this patch.

We can enhance the tool after the initial push.  I'd like to get it
in jdk8 soon so that developers can try it out and give feedback.


More information about the compiler-dev mailing list