Java Reference
In-Depth Information
Here,
<classes>
can be a pathname to a
.class
file, a directory, a JAR file, or a fully qualified class name.
Table
C-3
lists all the options for the
jdeps
tool.
Table C-3.
List of Options for the jdeps Tool
Option
Description
-dotoutput <dir>
Specifies the destination directory for DOT file output.
-s
-summary
Prints dependency summary only.
-v
-verbose
Prints all class level dependencies.
-verbose:package
Prints package-level dependencies excluding dependencies within the same archive.
-verbose:class
Prints class-level dependencies excluding dependencies within the same archive.
-cp <path>
-classpath <path>
Specifies the locations where class files are searched.
-p <pkgname>
-package <pkgname>
Finds dependences in the specified package. This option may be specified multiple times.
This option and
-e
option are mutually exclusive.
-e <regex>
-regex <regex>
Finds dependences in packages matching the specified pattern. This option and
-p
option
are mutually exclusive.
-include <regex>
Restricts analysis to classes matching the specified pattern. It is used to filter the list of
classes to be analyzed. It can be used together with
-p
and
-e
options, which apply pattern
to the dependences.
-P
-profile
Shows profile or the file containing a package.
-apionly
Restricts analysis to APIs only that includes dependences from the signature of
public
and
protected
members of
public
classes including field type, method parameter types,
returned type, checked exception types, etc.
-R
-recursive
Recursively traverses all dependencies.
-jdkinternals
Finds class-level dependences on JDK internal APIs. By default, it analyzes all classes on
-cp
and input files unless
-include
option is specified. It cannot be used with
-p
,
-e
, and
-s
options.
-version
Prints the version information.
-h
-?
-help
Prints a help message for the
jdeps
tool listing all options with a brief description.
The following command prints the dependencies for the
SwingTest
class:
jdeps SwingTest.class
SwingTest.class -> C:\java8\jre\lib\rt.jar
com.jdojo.profiles (SwingTest.class)
-> java.lang
-> javax.swing