javadoc is built on top of the same classes as javac , and uses some of the source
compiler infrastructure to implement Javadoc features.
The typical way to use javadoc is to run it against a whole package, rather than just
javadoc has a very large number of switches and options that can control many
aspects of its behavior. Detailed discussion of all the options is outside the scope of
The jdeps tool is a static analysis tool for analyzing the dependencies of packages or
classes. The tool has a number of usages, from identifying developer code that
makes calls into the internal, undocumented JDK APIs (such as the sun.misc
classes), to helping trace transitive dependencies.
jdeps can also be used to confirm whether a JAR file can run under a Compact Pro‐
file (see later in the chapter for more details on Compact Profiles).
jdeps reports dependency information for the classes it is asked to analyze. The
classes can be specified as any class on the classpath, a file path, a directory, or a JAR
Prints dependency summary only.
Prints all class-level dependencies.
Prints package-level dependencies, excluding dependencies within the same
Prints class-level dependencies, excluding dependencies within the same
-p <pkg name>, -package <pkg name>
Finds dependencies in the specified package. You can specify this option multi‐
ple times for different packages. The -p and -e options are mutually exclusive.