manpagez: man pages & more
man jdeps(1)
Home | html | info | man
jdeps(1)                         JDK Commands                         jdeps(1)


       jdeps - launch the Java class dependency analyzer


       jdeps [options] path ...

              Command-line  options.  For detailed descriptions of the options
              that can be used, see

              o Possible Options

              o Module Dependence Analysis Options

              o Options to Filter Dependences

              o Options to Filter Classes to be Analyzed

       path   A pathname to the .class file, directory, or JAR  file  to  ana-


       The  jdeps  command shows the package-level or class-level dependencies
       of Java class files.  The input class can be a path name  to  a  .class
       file,  a  directory,  a  JAR file, or it can be a fully qualified class
       name to analyze all class files.  The options determine the output.  By
       default,  the  jdeps command writes the dependencies to the system out-
       put.  The command can generate the dependencies in  DOT  language  (see
       the -dotoutput option).


       -? or -h or --help
              Prints the help message.

       -dotoutput dir or --dot-output dir
              Specifies  the  destination  directory  for DOT file output.  If
              this option is specified, then the  jdepscommand  generates  one
              .dot  file for each analyzed archive named
              that lists the dependencies, and also a summary file named  sum-
     that lists the dependencies among the archive files.

       -s or -summary
              Prints a dependency summary only.

       -v or -verbose
              Prints all class-level dependencies.  This is equivalent to

                     -verbose:class -filter:none

              Prints  package-level dependencies excluding, by default, depen-
              dences within the same package.

              Prints class-level dependencies excluding, by default, dependen-
              cies within the same archive.

       -apionly or --api-only
              Restricts  the  analysis  to APIs, for example, dependences from
              the signature of public and protected members of public  classes
              including field type, method parameter types, returned type, and
              checked exception types.

       -jdkinternals or --jdk-internals
              Finds class-level dependences in the JDK internal APIs.  By  de-
              fault,  this  option  analyzes  all  classes  specified  in  the
              --classpath option and input files unless you specified the -in-
              clude option.  You can't use this option with the -p, -e, and -s

              Warning: The JDK internal APIs are inaccessible.

       -cp path, -classpath path, or --class-path path
              Specifies where to find class files.

       --module-path module-path
              Specifies the module path.

       --upgrade-module-path module-path
              Specifies the upgrade module path.

       --system java-home
              Specifies an alternate system module path.

       --add-modules module-name[, module-name...]
              Adds modules to the root set for analysis.

       --multi-release version
              Specifies the version when processing multi-release  JAR  files.
              version should be an integer >=9 or base.

       -q or -quiet
              Doesn't  show  missing  dependencies  from -generate-module-info

       -version or --version
              Prints version information.


       -m module-name or --module module-name
              Specifies the root module for analysis.

       --generate-module-info dir
              Generates under the specified  directory.   The
              specified  JAR  files  will  be analyzed.  This option cannot be
              used with --dot-output or --class-path options.  Use the  --gen-
              erate-open-module option for open modules.

       --generate-open-module dir
              Generates for the specified JAR files under the
              specified directory as open modules.  This option cannot be used
              with the --dot-output or --class-path options.

       --check module-name [, module-name...]
              Analyzes the dependence of the specified modules.  It prints the
              module descriptor, the resulting module dependences after analy-
              sis  and  the graph after transition reduction.  It also identi-
              fies any unused qualified exports.

              Lists the module dependences and also the package names  of  JDK
              internal  APIs  (if  referenced).  This option transitively ana-
              lyzes libraries on class path and  module  path  if  referenced.
              Use  --no-recursive  option for non-transitive dependency analy-

              Same as --list-deps without listing the implied reads edges from
              the  module graph.  If module M1 reads M2, and M2 requires tran-
              sitive on M3, then M1 reading M3 is implied and is not shown  in
              the graph.

              Same as --list-reduced-deps with printing a comma-separated list
              of  module   dependences.    The   output   can   be   used   by
              jlink --add-modules to create a custom image that contains those
              modules and their transitive dependences.

              Ignore missing dependences.


       -p pkg_name, -package pkg_name, or --package pkg_name
              Finds dependences matching the specified package name.  You  can
              specify  this option multiple times for different packages.  The
              -p and -e options are mutually exclusive.

       -e regex, -regex regex, or --regex regex
              Finds dependences matching the specified pattern.  The -p and -e
              options are mutually exclusive.

       --require module-name
              Finds  dependences  matching the given module name (may be given
              multiple times).  The --package, --regex, and --require  options
              are mutually exclusive.

       -f regex or -filter regex
              Filters  dependences matching the given pattern.  If give multi-
              ple times, the last one will be selected.

              Filters dependences within the same package.  This  is  the  de-

              Filters dependences within the same archive.

              Filters dependences within the same module.

              No  -filter:package  and  -filter:archive  filtering.  Filtering
              specified via the -filter option still applies.

              Finds missing dependences.  This option cannot be used with  -p,
              -e and -s options.


       -include regex
              Restricts analysis to the classes matching pattern.  This option
              filters the list of classes to be analyzed.  It can be used  to-
              gether  with -p and -e, which apply the pattern to the dependen-

       -P or -profile
              Shows the profile containing a package.

       -R or --recursive
              Recursively traverses all run-time dependences.  The  -R  option
              implies  -filter:none.   If -p, -e, or -f options are specified,
              only the matching dependences are analyzed.

              Do not recursively traverse dependences.

       -I or --inverse
              Analyzes the dependences per other given options and then  finds
              all  artifacts that directly and indirectly depend on the match-
              ing nodes.  This is  equivalent  to  the  inverse  of  the  com-
              pile-time  view analysis and the print dependency summary.  This
              option must be used with the --require,  --package,  or  --regex

              Analyzes  the compile-time view of transitive dependencies, such
              as the compile-time view of the -R option.  Analyzes the  depen-
              dences  per  other  specified options.  If a dependency is found
              from a directory, a JAR file or a module, all  classes  in  that
              containing archive are analyzed.


       The  following  example  demonstrates analyzing the dependencies of the
       Notepad.jar file.

       Linux and OS X:

              $ jdeps demo/jfc/Notepad/Notepad.jar
              Notepad.jar -> java.base
              Notepad.jar -> java.desktop
              Notepad.jar -> java.logging
                 <unnamed> (Notepad.jar)
                    -> java.awt
                    -> java.awt.event
                    -> java.beans
                    -> java.lang
                    -> java.util
                    -> java.util.logging
                    -> javax.swing
                    -> javax.swing.border
                    -> javax.swing.event
                    -> javax.swing.text
                    -> javax.swing.tree
                    -> javax.swing.undo


              C:\Java\jdk1.9.0>jdeps demo\jfc\Notepad\Notepad.jar
              Notepad.jar -> java.base
              Notepad.jar -> java.desktop
              Notepad.jar -> java.logging
                 <unnamed> (Notepad.jar)
                    -> java.awt
                    -> java.awt.event
                    -> java.beans
                    -> java.lang
                    -> java.util
                    -> java.util.logging
                    -> javax.swing
                    -> javax.swing.border
                    -> javax.swing.event
                    -> javax.swing.text
                    -> javax.swing.tree
                    -> javax.swing.undo


               $ jdeps --inverse --require java.xml.bind
              Inverse transitive dependences on [java.xml.bind]
              java.xml.bind <-
              java.xml.bind <-
              java.xml.bind <- <-
              java.xml.bind <- <-
              java.xml.bind <- jdk.xml.bind <-

JDK 15                               2020                             jdeps(1)

openjdk 15.0.2 - Generated Tue Feb 23 16:15:24 CST 2021
© 2000-2021
Individual documents may contain additional copyright information.