< prev index next >

src/jdk.jdeps/share/man/jdeps.1

Print this page


   1 .\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.

   2 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3 .\"
   4 .\" This code is free software; you can redistribute it and/or modify it
   5 .\" under the terms of the GNU General Public License version 2 only, as
   6 .\" published by the Free Software Foundation.
   7 .\"
   8 .\" This code is distributed in the hope that it will be useful, but WITHOUT
   9 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11 .\" version 2 for more details (a copy is included in the LICENSE file that
  12 .\" accompanied this code).
  13 .\"
  14 .\" You should have received a copy of the GNU General Public License version
  15 .\" 2 along with this work; if not, write to the Free Software Foundation,
  16 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17 .\"
  18 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19 .\" or visit www.oracle.com if you need additional information or have any
  20 .\" questions.
  21 .\"
  22 .\" Automatically generated by Pandoc 2.3.1




  23 .\"
  24 .TH "JDEPS" "1" "2018" "JDK 13" "JDK Commands"
  25 .hy
  26 .SH NAME
  27 .PP
  28 jdeps \- launch the Java class dependency analyzer
  29 .SH SYNOPSIS
  30 .PP
  31 \f[CB]jdeps\f[R] [\f[I]options\f[R]] \f[I]path\f[R] ...
  32 .TP
  33 .B \f[I]options\f[R]
  34 Command\-line options.
  35 For detailed descriptions of the options that can be used, see
  36 .RS
  37 .IP \[bu] 2
  38 \f[B]Possible Options\f[R]
  39 .IP \[bu] 2
  40 \f[B]Module Dependence Analysis Options\f[R]
  41 .IP \[bu] 2
  42 \f[B]Options to Filter Dependences\f[R]
  43 .IP \[bu] 2
  44 \f[B]Options to Filter Classes to be Analyzed\f[R]
  45 .RE
  46 .TP
  47 .B \f[I]path\f[R]
  48 A pathname to the \f[CB]\&.class\f[R] file, directory, or JAR file to
  49 analyze.
  50 .RS
  51 .RE
  52 .SH DESCRIPTION
  53 .PP
  54 The \f[CB]jdeps\f[R] command shows the package\-level or class\-level
  55 dependencies of Java class files.
  56 The input class can be a path name to a \f[CB]\&.class\f[R] file, a
  57 directory, a JAR file, or it can be a fully qualified class name to
  58 analyze all class files.
  59 The options determine the output.
  60 By default, the \f[CB]jdeps\f[R] command writes the dependencies to the
  61 system output.
  62 The command can generate the dependencies in DOT language (see the
  63 \f[CB]\-dotoutput\f[R] option).
  64 .SH POSSIBLE OPTIONS
  65 .TP
  66 .B \f[CB]\-dotoutput\f[R] \f[I]dir\f[R] or \f[CB]\-\-dot\-output\f[R] \f[I]dir\f[R]
  67 Specifies the destination directory for DOT file output.
  68 If this option is specified, then the \f[CB]jdeps\f[R]command generates
  69 one \f[CB]\&.dot\f[R] file for each analyzed archive named
  70 \f[CB]archive\-file\-name.dot\f[R] that lists the dependencies, and also a
  71 summary file named \f[CB]summary.dot\f[R] that lists the dependencies
  72 among the archive files.
  73 .RS
  74 .RE
  75 .TP
  76 .B \f[CB]\-s\f[R] or \f[CB]\-summary\f[R]
  77 Prints a dependency summary only.
  78 .RS
  79 .RE
  80 .TP
  81 .B \f[CB]\-v\f[R] or \f[CB]\-verbose\f[R]
  82 Prints all class\-level dependencies.
  83 This is equivalent to
  84 .RS
  85 .RS
  86 .PP
  87 \f[CB]\-verbose:class\ \-filter:none\f[R]
  88 .RE
  89 .RE
  90 .TP
  91 .B \f[CB]\-verbose:package\f[R]
  92 Prints package\-level dependencies excluding, by default, dependences
  93 within the same package.
  94 .RS
  95 .RE
  96 .TP
  97 .B \f[CB]\-verbose:class\f[R]
  98 Prints class\-level dependencies excluding, by default, dependencies
  99 within the same archive.
 100 .RS
 101 .RE
 102 .TP
 103 .B \f[CB]\-apionly\f[R] or \f[CB]\-\-api\-only\f[R]
 104 Restricts the analysis to APIs, for example, dependences from the
 105 signature of \f[CB]public\f[R] and \f[CB]protected\f[R] members of public
 106 classes including field type, method parameter types, returned type, and
 107 checked exception types.
 108 .RS
 109 .RE
 110 .TP
 111 .B \f[CB]\-jdkinternals\f[R] or \f[CB]\-\-jdk\-internals\f[R]
 112 Finds class\-level dependences in the JDK internal APIs.
 113 By default, this option analyzes all classes specified in the
 114 \f[CB]\-\-classpath\f[R] option and input files unless you specified the
 115 \f[CB]\-include\f[R] option.
 116 You can\[aq]t use this option with the \f[CB]\-p\f[R], \f[CB]\-e\f[R], and
 117 \f[CB]\-s\f[R] options.
 118 .RS
 119 .PP
 120 \f[B]Warning\f[R]: The JDK internal APIs are inaccessible.
 121 .RE
 122 .TP
 123 .B \f[CB]\-cp\f[R] \f[I]path\f[R], \f[CB]\-classpath\f[R] \f[I]path\f[R], or \f[CB]\-\-class\-path\f[R] \f[I]path\f[R]
 124 Specifies where to find class files.
 125 .RS
 126 .RE
 127 .TP
 128 .B \f[CB]\-\-module\-path\f[R] \f[I]module\-path\f[R]
 129 Specifies the module path.
 130 .RS
 131 .RE
 132 .TP
 133 .B \f[CB]\-\-upgrade\-module\-path\f[R] \f[I]module\-path\f[R]
 134 Specifies the upgrade module path.
 135 .RS
 136 .RE
 137 .TP
 138 .B \f[CB]\-\-system\f[R] \f[I]java\-home\f[R]
 139 Specifies an alternate system module path.
 140 .RS
 141 .RE
 142 .TP
 143 .B \f[CB]\-\-add\-modules\f[R] \f[I]module\-name\f[R][\f[CB],\f[R] \f[I]module\-name\f[R]...]
 144 Adds modules to the root set for analysis.
 145 .RS
 146 .RE
 147 .TP
 148 .B \f[CB]\-\-multi\-release\f[R] \f[I]version\f[R]
 149 Specifies the version when processing multi\-release JAR files.
 150 \f[I]version\f[R] should be an integer >=9 or base.
 151 .RS
 152 .RE
 153 .TP
 154 .B \f[CB]\-q\f[R] or \f[CB]\-quiet\f[R]
 155 Doesn\[aq]t show missing dependencies from
 156 \f[CB]\-generate\-module\-info\f[R] output.
 157 .RS
 158 .RE
 159 .TP
 160 .B \f[CB]\-version\f[R] or \f[CB]\-\-version\f[R]
 161 Prints version information.
 162 .RS
 163 .RE
 164 .SH MODULE DEPENDENCE ANALYSIS OPTIONS
 165 .TP
 166 .B \f[CB]\-m\f[R] \f[I]module\-name\f[R] or \f[CB]\-\-module\f[R] \f[I]module\-name\f[R]
 167 Specifies the root module for analysis.
 168 .RS
 169 .RE
 170 .TP
 171 .B \f[CB]\-\-generate\-module\-info\f[R] \f[I]dir\f[R]
 172 Generates \f[CB]module\-info.java\f[R] under the specified directory.
 173 The specified JAR files will be analyzed.
 174 This option cannot be used with \f[CB]\-\-dot\-output\f[R] or
 175 \f[CB]\-\-class\-path\f[R] options.
 176 Use the \f[CB]\-\-generate\-open\-module\f[R] option for open modules.
 177 .RS
 178 .RE
 179 .TP
 180 .B \f[CB]\-\-generate\-open\-module\f[R] \f[I]dir\f[R]
 181 Generates \f[CB]module\-info.java\f[R] for the specified JAR files under
 182 the specified directory as open modules.
 183 This option cannot be used with the \f[CB]\-\-dot\-output\f[R] or
 184 \f[CB]\-\-class\-path\f[R] options.
 185 .RS
 186 .RE
 187 .TP
 188 .B \f[CB]\-\-check\f[R] \f[I]module\-name\f[R] [\f[CB],\f[R] \f[I]module\-name\f[R]...]
 189 Analyzes the dependence of the specified modules.
 190 It prints the module descriptor, the resulting module dependences after
 191 analysis and the graph after transition reduction.
 192 It also identifies any unused qualified exports.
 193 .RS
 194 .RE
 195 .TP
 196 .B \f[CB]\-\-list\-deps\f[R]
 197 Lists the module dependences and also the package names of JDK internal
 198 APIs (if referenced).
 199 This option transitively analyzes libraries on class path and module
 200 path if referenced.
 201 Use \f[CB]\-\-no\-recursive\f[R] option for non\-transitive dependency
 202 analysis.
 203 .RS
 204 .RE
 205 .TP
 206 .B \f[CB]\-\-list\-reduced\-deps\f[R]
 207 Same as \f[CB]\-\-list\-deps\f[R] without listing the implied reads edges
 208 from the module graph.
 209 If module M1 reads M2, and M2 requires transitive on M3, then M1 reading
 210 M3 is implied and is not shown in the graph.
 211 .RS
 212 .RE
 213 .TP
 214 .B \f[CB]\-\-print\-module\-deps\f[R]
 215 Same as \f[CB]\-\-list\-reduced\-deps\f[R] with printing a
 216 comma\-separated list of module dependences.
 217 The output can be used by \f[CB]jlink\ \-\-add\-modules\f[R] to create a
 218 custom image that contains those modules and their transitive
 219 dependences.
 220 .RS
 221 .RE
 222 .TP
 223 .B \f[CB]\-\-ignore\-missing\-deps\f[R]
 224 Ignore missing dependences.
 225 .RS
 226 .RE
 227 .SH OPTIONS TO FILTER DEPENDENCES
 228 .TP
 229 .B \f[CB]\-p\f[R] \f[I]pkg_name\f[R], \f[CB]\-package\f[R] \f[I]pkg_name\f[R], or \f[CB]\-\-package\f[R] \f[I]pkg_name\f[R]
 230 Finds dependences matching the specified package name.
 231 You can specify this option multiple times for different packages.
 232 The \f[CB]\-p\f[R] and \f[CB]\-e\f[R] options are mutually exclusive.
 233 .RS
 234 .RE
 235 .TP
 236 .B \f[CB]\-e\f[R] \f[I]regex\f[R], \f[CB]\-regex\f[R] \f[I]regex\f[R], or \f[CB]\-\-regex\f[R] \f[I]regex\f[R]
 237 Finds dependences matching the specified pattern.
 238 The \f[CB]\-p\f[R] and \f[CB]\-e\f[R] options are mutually exclusive.
 239 .RS
 240 .RE
 241 .TP
 242 .B \f[CB]\-\-require\f[R] \f[I]module\-name\f[R]
 243 Finds dependences matching the given module name (may be given multiple
 244 times).
 245 The \f[CB]\-\-package\f[R], \f[CB]\-\-regex\f[R], and \f[CB]\-\-require\f[R]
 246 options are mutually exclusive.
 247 .RS
 248 .RE
 249 .TP
 250 .B \f[CB]\-f\f[R] \f[I]regex\f[R] or \f[CB]\-filter\f[R] \f[I]regex\f[R]
 251 Filters dependences matching the given pattern.
 252 If give multiple times, the last one will be selected.
 253 .RS
 254 .RE
 255 .TP
 256 .B \f[CB]\-filter:package\f[R]
 257 Filters dependences within the same package.
 258 This is the default.
 259 .RS
 260 .RE
 261 .TP
 262 .B \f[CB]\-filter:archive\f[R]
 263 Filters dependences within the same archive.
 264 .RS
 265 .RE
 266 .TP
 267 .B \f[CB]\-filter:module\f[R]
 268 Filters dependences within the same module.
 269 .RS
 270 .RE
 271 .TP
 272 .B \f[CB]\-filter:none\f[R]
 273 No \f[CB]\-filter:package\f[R] and \f[CB]\-filter:archive\f[R] filtering.
 274 Filtering specified via the \f[CB]\-filter\f[R] option still applies.
 275 .RS
 276 .RE
 277 .TP
 278 .B \f[CB]\-\-missing\-deps\f[R]
 279 Finds missing dependences.
 280 This option cannot be used with \f[CB]\-p\f[R], \f[CB]\-e\f[R] and
 281 \f[CB]\-s\f[R] options.
 282 .RS
 283 .RE
 284 .SH OPTIONS TO FILTER CLASSES TO BE ANALYZED
 285 .TP
 286 .B \f[CB]\-include\f[R] \f[I]regex\f[R]
 287 Restricts analysis to the classes matching pattern.
 288 This option filters the list of classes to be analyzed.
 289 It can be used together with \f[CB]\-p\f[R] and \f[CB]\-e\f[R], which apply
 290 the pattern to the dependencies.
 291 .RS
 292 .RE
 293 .TP
 294 .B \f[CB]\-P\f[R] or \f[CB]\-profile\f[R]
 295 Shows the profile containing a package.
 296 .RS
 297 .RE
 298 .TP
 299 .B \f[CB]\-R\f[R] or \f[CB]\-recursive\f[R]
 300 Recursively traverses all run\-time dependences.
 301 The \f[CB]\-R\f[R] option implies \f[CB]\-filter:none\f[R].
 302 If \f[CB]\-p\f[R], \f[CB]\-e\f[R], or \f[CB]\-f\f[R] options are specified,
 303 only the matching dependences are analyzed.
 304 .RS
 305 .RE
 306 .TP
 307 .B \f[CB]\-\-no\-recursive\f[R]
 308 Do not recursively traverse dependences.
 309 .RS
 310 .RE
 311 .TP
 312 .B \f[CB]\-I\f[R] or \f[CB]\-inverse\f[R]
 313 Analyzes the dependences per other given options and then finds all
 314 artifacts that directly and indirectly depend on the matching nodes.
 315 This is equivalent to the inverse of the compile\-time view analysis and
 316 the print dependency summary.
 317 This option must be used with the \f[CB]\-\-require\f[R],
 318 \f[CB]\-\-package\f[R], or \f[CB]\-\-regex\f[R] options.
 319 .RS
 320 .RE
 321 .TP
 322 .B \f[CB]\-\-compile\-time\f[R]
 323 Analyzes the compile\-time view of transitive dependencies, such as the
 324 compile\-time view of the \f[CB]\-R\f[R] option.
 325 Analyzes the dependences per other specified options.
 326 If a dependency is found from a directory, a JAR file or a module, all
 327 classes in that containing archive are analyzed.
 328 .RS
 329 .RE
 330 .SH EXAMPLE OF ANALYZING DEPENDENCIES
 331 .PP
 332 The following example demonstrates analyzing the dependencies of the
 333 \f[CB]Notepad.jar\f[R] file.
 334 .PP
 335 \f[B]Oracle Solaris, Linux, and OS X:\f[R]
 336 .IP
 337 .nf
 338 \f[CB]
 339 $\ jdeps\ demo/jfc/Notepad/Notepad.jar
 340 Notepad.jar\ \->\ java.base
 341 Notepad.jar\ \->\ java.desktop
 342 Notepad.jar\ \->\ java.logging
 343 \ \ \ <unnamed>\ (Notepad.jar)
 344 \ \ \ \ \ \ \->\ java.awt
 345 \ \ \ \ \ \ \->\ java.awt.event
 346 \ \ \ \ \ \ \->\ java.beans
 347 \ \ \ \ \ \ \->\ java.io
 348 \ \ \ \ \ \ \->\ java.lang
 349 \ \ \ \ \ \ \->\ java.net
 350 \ \ \ \ \ \ \->\ java.util
 351 \ \ \ \ \ \ \->\ java.util.logging
 352 \ \ \ \ \ \ \->\ javax.swing
 353 \ \ \ \ \ \ \->\ javax.swing.border
 354 \ \ \ \ \ \ \->\ javax.swing.event
 355 \ \ \ \ \ \ \->\ javax.swing.text
 356 \ \ \ \ \ \ \->\ javax.swing.tree
 357 \ \ \ \ \ \ \->\ javax.swing.undo
 358 \f[R]
 359 .fi
 360 .PP
 361 \f[B]Windows:\f[R]
 362 .IP
 363 .nf
 364 \f[CB]
 365 C:\\Java\\jdk1.9.0>jdeps\ demo\\jfc\\Notepad\\Notepad.jar
 366 Notepad.jar\ \->\ java.base
 367 Notepad.jar\ \->\ java.desktop
 368 Notepad.jar\ \->\ java.logging
 369 \ \ \ <unnamed>\ (Notepad.jar)
 370 \ \ \ \ \ \ \->\ java.awt
 371 \ \ \ \ \ \ \->\ java.awt.event
 372 \ \ \ \ \ \ \->\ java.beans
 373 \ \ \ \ \ \ \->\ java.io
 374 \ \ \ \ \ \ \->\ java.lang
 375 \ \ \ \ \ \ \->\ java.net
 376 \ \ \ \ \ \ \->\ java.util
 377 \ \ \ \ \ \ \->\ java.util.logging
 378 \ \ \ \ \ \ \->\ javax.swing
 379 \ \ \ \ \ \ \->\ javax.swing.border
 380 \ \ \ \ \ \ \->\ javax.swing.event
 381 \ \ \ \ \ \ \->\ javax.swing.text
 382 \ \ \ \ \ \ \->\ javax.swing.tree
 383 \ \ \ \ \ \ \->\ javax.swing.undo
 384 \f[R]
 385 .fi
 386 .SH EXAMPLE USING THE \-\-INVERSE OPTION
 387 .IP
 388 .nf
 389 \f[CB]
 390 \ $\ jdeps\ \-\-inverse\ \-\-require\ java.xml.bind
 391 Inverse\ transitive\ dependences\ on\ [java.xml.bind]
 392 java.xml.bind\ <\-\ java.se.ee
 393 java.xml.bind\ <\-\ jdk.xml.ws
 394 java.xml.bind\ <\-\ java.xml.ws\ <\-\ java.se.ee
 395 java.xml.bind\ <\-\ java.xml.ws\ <\-\ jdk.xml.ws
 396 java.xml.bind\ <\-\ jdk.xml.bind\ <\-\ jdk.xml.ws
 397 \f[R]
 398 .fi






































































































































   1 '\" t
   2 .\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 .\"
   5 .\" This code is free software; you can redistribute it and/or modify it
   6 .\" under the terms of the GNU General Public License version 2 only, as
   7 .\" published by the Free Software Foundation.
   8 .\"
   9 .\" This code is distributed in the hope that it will be useful, but WITHOUT
  10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 .\" version 2 for more details (a copy is included in the LICENSE file that
  13 .\" accompanied this code).
  14 .\"
  15 .\" You should have received a copy of the GNU General Public License version
  16 .\" 2 along with this work; if not, write to the Free Software Foundation,
  17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 .\"
  19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 .\" or visit www.oracle.com if you need additional information or have any
  21 .\" questions.
  22 .\"
  23 .\"     Arch: generic
  24 .\"     Software: JDK 8
  25 .\"     Date: 21 November 2013
  26 .\"     SectDesc: Basic Tools
  27 .\"     Title: jdeps.1
  28 .\"
  29 .if n .pl 99999
  30 .TH jdeps 1 "21 November 2013" "JDK 8" "Basic Tools"
  31 .\" -----------------------------------------------------------------
  32 .\" * Define some portability stuff
  33 .\" -----------------------------------------------------------------
  34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35 .\" http://bugs.debian.org/507673
  36 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38 .ie \n(.g .ds Aq \(aq
  39 .el       .ds Aq '
  40 .\" -----------------------------------------------------------------
  41 .\" * set default formatting
  42 .\" -----------------------------------------------------------------
  43 .\" disable hyphenation
  44 .nh
  45 .\" disable justification (adjust text to left margin only)
  46 .ad l
  47 .\" -----------------------------------------------------------------
  48 .\" * MAIN CONTENT STARTS HERE *
  49 .\" -----------------------------------------------------------------
  50 
  51 .SH NAME    
  52 jdeps \- Java class dependency analyzer\&.
  53 .SH SYNOPSIS    
  54 .sp     
  55 .nf     
  56 
  57 \fBjdeps\fR [\fIoptions\fR] \fIclasses\fR \&.\&.\&.
  58 .fi     
  59 .sp     
  60 .TP     
  61 \fIoptions\fR
  62 Command-line options\&. See Options\&.
  63 .TP     
  64 \fIclasses\fR
  65 Name of the classes to analyze\&. You can specify a class that can be found in the class path, by its file name, a directory, or a JAR file\&.
  66 .SH DESCRIPTION    
  67 The \fI\fR\f3jdeps\fR command shows the package-level or class-level dependencies of Java class files\&. The input class can be a path name to a \f3\&.class\fR 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, \f3jdeps\fR outputs the dependencies to the system output\&. It can generate the dependencies in DOT language (see the \f3-dotoutput\fR option)\&.
  68 .SH OPTIONS    
  69 .TP
  70 -dotoutput <\fIdir\fR>
  71 .br
  72 Destination directory for DOT file output\&. If specified, \f3jdeps\fR will generate one dot file per each analyzed archive named <\fIarchive-file-name\fR>\&.dot listing the dependencies, and also a summary file named summary\&.dot listing the dependencies among the archives\&.
  73 .TP
  74 -s, -summary
  75 .br
  76 Prints dependency summary only\&.
  77 .TP
  78 -v, -verbose
  79 .br
  80 Prints all class-level dependencies\&.
  81 .TP
  82 -verbose:package
  83 .br
  84 Prints package-level dependencies excluding dependencies within the same archive\&.
  85 .TP
  86 -verbose:class
  87 .br
  88 Prints class-level dependencies excluding dependencies within the same archive\&.
  89 .TP
  90 -cp <\fIpath\fR>, -classpath <\fIpath\fR>
  91 .br
  92 Specifies where to find class files\&.
  93 
  94 See also Setting the Class Path\&.
  95 .TP
  96 -p <\fIpkg name\fR>, -package <\fIpkg name\fR>
  97 .br
  98 Finds dependencies in the specified package\&. You can specify this option multiple times for different packages\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
  99 .TP
 100 -e <\fIregex\fR>, -regex <\fIregex\fR>
 101 .br
 102 Finds dependencies in packages matching the specified regular expression pattern\&. The \f3-p\fR and \f3-e\fR options are mutually exclusive\&.
 103 .TP
 104 -include <\fIregex\fR>
 105 .br
 106 Restricts analysis to classes matching pattern\&. This option filters the list of classes to be analyzed\&. It can be used together with \f3-p\fR and \f3-e\fR which apply pattern to the dependencies\&.
 107 .TP
 108 -jdkinternals
 109 .br
 110 Finds class-level dependences in JDK internal APIs\&. By default, it analyzes all classes specified in the \f3-classpath\fR option and in input files unless you specified the \f3-include\fR option\&. You cannot use this option with the \f3-p\fR, \f3-e\fR, and \f3-s\fR options\&.
 111 
 112 \fIWarning\fR: JDK internal APIs may not be accessible in upcoming releases\&.
 113 .TP
 114 -P, -profile
 115 .br
 116 Shows profile or the file containing a package\&.
 117 .TP
 118 -apionly
 119 .br
 120 Restricts analysis to APIs, for example, dependences from the signature of \f3public\fR and \f3protected\fR members of public classes including field type, method parameter types, returned type, and checked exception types\&.
 121 .TP
 122 -R, -recursive
 123 .br
 124 Recursively traverses all dependencies\&.
 125 .TP
 126 -version
 127 .br
 128 Prints version information\&.
 129 .TP
 130 -h, -?, -help
 131 .br
 132 Prints help message for \f3jdeps\fR\&.
 133 .SH EXAMPLES    
 134 Analyzing the dependencies of Notepad\&.jar\&.
 135 .sp     
 136 .nf     
 137 \f3$ jdeps demo/jfc/Notepad/Notepad\&.jar\fP
 138 .fi     
 139 .nf     
 140 \f3\fP
 141 .fi     
 142 .nf     
 143 \f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
 144 .fi     
 145 .nf     
 146 \f3   <unnamed> (Notepad\&.jar)\fP
 147 .fi     
 148 .nf     
 149 \f3      \-> java\&.awt                                           \fP
 150 .fi     
 151 .nf     
 152 \f3      \-> java\&.awt\&.event                                     \fP
 153 .fi     
 154 .nf     
 155 \f3      \-> java\&.beans                                         \fP
 156 .fi     
 157 .nf     
 158 \f3      \-> java\&.io                                            \fP
 159 .fi     
 160 .nf     
 161 \f3      \-> java\&.lang                                          \fP
 162 .fi     
 163 .nf     
 164 \f3      \-> java\&.net                                           \fP
 165 .fi     
 166 .nf     
 167 \f3      \-> java\&.util                                          \fP
 168 .fi     
 169 .nf     
 170 \f3      \-> java\&.util\&.logging                                  \fP
 171 .fi     
 172 .nf     
 173 \f3      \-> javax\&.swing                                        \fP
 174 .fi     
 175 .nf     
 176 \f3      \-> javax\&.swing\&.border                                 \fP
 177 .fi     
 178 .nf     
 179 \f3      \-> javax\&.swing\&.event                                  \fP
 180 .fi     
 181 .nf     
 182 \f3      \-> javax\&.swing\&.text                                   \fP
 183 .fi     
 184 .nf     
 185 \f3      \-> javax\&.swing\&.tree                                   \fP
 186 .fi     
 187 .nf     
 188 \f3      \-> javax\&.swing\&.undo  \fP
 189 .fi     
 190 .nf     
 191 \f3\fP
 192 .fi     
 193 .sp     
 194 Use -P or -profile option to show on which profile that Notepad depends\&.
 195 .sp     
 196 .nf     
 197 \f3$ jdeps \-profile demo/jfc/Notepad/Notepad\&.jar \fP
 198 .fi     
 199 .nf     
 200 \f3demo/jfc/Notepad/Notepad\&.jar \-> /usr/java/jre/lib/rt\&.jar (Full JRE)\fP
 201 .fi     
 202 .nf     
 203 \f3   <unnamed> (Notepad\&.jar)\fP
 204 .fi     
 205 .nf     
 206 \f3      \-> java\&.awt                                           Full JRE\fP
 207 .fi     
 208 .nf     
 209 \f3      \-> java\&.awt\&.event                                     Full JRE\fP
 210 .fi     
 211 .nf     
 212 \f3      \-> java\&.beans                                         Full JRE\fP
 213 .fi     
 214 .nf     
 215 \f3      \-> java\&.io                                            compact1\fP
 216 .fi     
 217 .nf     
 218 \f3      \-> java\&.lang                                          compact1\fP
 219 .fi     
 220 .nf     
 221 \f3      \-> java\&.net                                           compact1\fP
 222 .fi     
 223 .nf     
 224 \f3      \-> java\&.util                                          compact1\fP
 225 .fi     
 226 .nf     
 227 \f3      \-> java\&.util\&.logging                                  compact1\fP
 228 .fi     
 229 .nf     
 230 \f3      \-> javax\&.swing                                        Full JRE\fP
 231 .fi     
 232 .nf     
 233 \f3      \-> javax\&.swing\&.border                                 Full JRE\fP
 234 .fi     
 235 .nf     
 236 \f3      \-> javax\&.swing\&.event                                  Full JRE\fP
 237 .fi     
 238 .nf     
 239 \f3      \-> javax\&.swing\&.text                                   Full JRE\fP
 240 .fi     
 241 .nf     
 242 \f3      \-> javax\&.swing\&.tree                                   Full JRE\fP
 243 .fi     
 244 .nf     
 245 \f3      \-> javax\&.swing\&.undo                                   Full JRE\fP
 246 .fi     
 247 .nf     
 248 \f3\fP
 249 .fi     
 250 .sp     
 251 Analyzing the immediate dependencies of a specific class in a given classpath, for example the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class in the tools\&.jar file\&.
 252 .sp     
 253 .nf     
 254 \f3$ jdeps \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
 255 .fi     
 256 .nf     
 257 \f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
 258 .fi     
 259 .nf     
 260 \f3   com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
 261 .fi     
 262 .nf     
 263 \f3      \-> java\&.io                                            \fP
 264 .fi     
 265 .nf     
 266 \f3      \-> java\&.lang \fP
 267 .fi     
 268 .nf     
 269 \f3\fP
 270 .fi     
 271 .sp     
 272 Use the \f3-verbose:class\fR option to find class-level dependencies or use the \f3-v\fR or \f3-verbose\fR option to include dependencies from the same JAR file\&.
 273 .sp     
 274 .nf     
 275 \f3$ jdeps \-verbose:class \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
 276 .fi     
 277 .nf     
 278 \f3\fP
 279 .fi     
 280 .nf     
 281 \f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
 282 .fi     
 283 .nf     
 284 \f3   com\&.sun\&.tools\&.jdeps\&.Main (tools\&.jar)\fP
 285 .fi     
 286 .nf     
 287 \f3      \-> java\&.io\&.PrintWriter                                \fP
 288 .fi     
 289 .nf     
 290 \f3      \-> java\&.lang\&.Exception                                \fP
 291 .fi     
 292 .nf     
 293 \f3      \-> java\&.lang\&.Object                                   \fP
 294 .fi     
 295 .nf     
 296 \f3      \-> java\&.lang\&.String                                   \fP
 297 .fi     
 298 .nf     
 299 \f3      \-> java\&.lang\&.System \fP
 300 .fi     
 301 .nf     
 302 \f3\fP
 303 .fi     
 304 .sp     
 305 Use the \f3-R\fR or \f3-recursive\fR option to analyze the transitive dependencies of the \f3com\&.sun\&.tools\&.jdeps\&.Main\fR class\&.
 306 .sp     
 307 .nf     
 308 \f3$ jdeps \-R \-cp lib/tools\&.jar com\&.sun\&.tools\&.jdeps\&.Main\fP
 309 .fi     
 310 .nf     
 311 \f3lib/tools\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
 312 .fi     
 313 .nf     
 314 \f3   com\&.sun\&.tools\&.classfile (tools\&.jar)\fP
 315 .fi     
 316 .nf     
 317 \f3      \-> java\&.io                                            \fP
 318 .fi     
 319 .nf     
 320 \f3      \-> java\&.lang                                          \fP
 321 .fi     
 322 .nf     
 323 \f3      \-> java\&.lang\&.reflect                                  \fP
 324 .fi     
 325 .nf     
 326 \f3      \-> java\&.nio\&.charset                                   \fP
 327 .fi     
 328 .nf     
 329 \f3      \-> java\&.nio\&.file                                      \fP
 330 .fi     
 331 .nf     
 332 \f3      \-> java\&.util                                          \fP
 333 .fi     
 334 .nf     
 335 \f3      \-> java\&.util\&.regex                                    \fP
 336 .fi     
 337 .nf     
 338 \f3   com\&.sun\&.tools\&.jdeps (tools\&.jar)\fP
 339 .fi     
 340 .nf     
 341 \f3      \-> java\&.io                                            \fP
 342 .fi     
 343 .nf     
 344 \f3      \-> java\&.lang                                          \fP
 345 .fi     
 346 .nf     
 347 \f3      \-> java\&.nio\&.file                                      \fP
 348 .fi     
 349 .nf     
 350 \f3      \-> java\&.nio\&.file\&.attribute                            \fP
 351 .fi     
 352 .nf     
 353 \f3      \-> java\&.text                                          \fP
 354 .fi     
 355 .nf     
 356 \f3      \-> java\&.util                                          \fP
 357 .fi     
 358 .nf     
 359 \f3      \-> java\&.util\&.jar                                      \fP
 360 .fi     
 361 .nf     
 362 \f3      \-> java\&.util\&.regex                                    \fP
 363 .fi     
 364 .nf     
 365 \f3      \-> java\&.util\&.zip                                      \fP
 366 .fi     
 367 .nf     
 368 \f3/usr/java/jre/lib/jce\&.jar \-> /usr/java/jre/lib/rt\&.jar\fP
 369 .fi     
 370 .nf     
 371 \f3   javax\&.crypto (jce\&.jar)\fP
 372 .fi     
 373 .nf     
 374 \f3      \-> java\&.io                                            \fP
 375 .fi     
 376 .nf     
 377 \f3      \-> java\&.lang                                          \fP
 378 .fi     
 379 .nf     
 380 \f3      \-> java\&.lang\&.reflect                                  \fP
 381 .fi     
 382 .nf     
 383 \f3      \-> java\&.net                                           \fP
 384 .fi     
 385 .nf     
 386 \f3      \-> java\&.nio                                           \fP
 387 .fi     
 388 .nf     
 389 \f3      \-> java\&.security                                      \fP
 390 .fi     
 391 .nf     
 392 \f3      \-> java\&.security\&.cert                                 \fP
 393 .fi     
 394 .nf     
 395 \f3      \-> java\&.security\&.spec                                 \fP
 396 .fi     
 397 .nf     
 398 \f3      \-> java\&.util                                          \fP
 399 .fi     
 400 .nf     
 401 \f3      \-> java\&.util\&.concurrent                               \fP
 402 .fi     
 403 .nf     
 404 \f3      \-> java\&.util\&.jar                                      \fP
 405 .fi     
 406 .nf     
 407 \f3      \-> java\&.util\&.regex                                    \fP
 408 .fi     
 409 .nf     
 410 \f3      \-> java\&.util\&.zip                                      \fP
 411 .fi     
 412 .nf     
 413 \f3      \-> javax\&.security\&.auth                                \fP
 414 .fi     
 415 .nf     
 416 \f3      \-> sun\&.security\&.jca                                   JDK internal API (rt\&.jar)\fP
 417 .fi     
 418 .nf     
 419 \f3      \-> sun\&.security\&.util                                  JDK internal API (rt\&.jar)\fP
 420 .fi     
 421 .nf     
 422 \f3   javax\&.crypto\&.spec (jce\&.jar)\fP
 423 .fi     
 424 .nf     
 425 \f3      \-> java\&.lang                                          \fP
 426 .fi     
 427 .nf     
 428 \f3      \-> java\&.security\&.spec                                 \fP
 429 .fi     
 430 .nf     
 431 \f3      \-> java\&.util                                          \fP
 432 .fi     
 433 .nf     
 434 \f3/usr/java/jre/lib/rt\&.jar \-> /usr/java/jre/lib/jce\&.jar\fP
 435 .fi     
 436 .nf     
 437 \f3   java\&.security (rt\&.jar)\fP
 438 .fi     
 439 .nf     
 440 \f3      \-> javax\&.crypto\fP
 441 .fi     
 442 .nf     
 443 \f3\fP
 444 .fi     
 445 .sp     
 446 Generate dot files of the dependencies of Notepad demo\&.
 447 .sp     
 448 .nf     
 449 \f3$ jdeps \-dotoutput dot demo/jfc/Notepad/Notepad\&.jar\fP
 450 .fi     
 451 .nf     
 452 \f3\fP
 453 .fi     
 454 .sp     
 455 \f3jdeps\fR will create one dot file for each given JAR file named <\fIfilename\fR>\&.dot in the dot directory specified in the \f3-dotoutput\fR option, and also a summary file named summary\&.dot that will list the dependencies among the JAR files
 456 .sp     
 457 .nf     
 458 \f3$ cat dot/Notepad\&.jar\&.dot \fP
 459 .fi     
 460 .nf     
 461 \f3digraph "Notepad\&.jar" {\fP
 462 .fi     
 463 .nf     
 464 \f3    // Path: demo/jfc/Notepad/Notepad\&.jar\fP
 465 .fi     
 466 .nf     
 467 \f3   "<unnamed>"                                        \-> "java\&.awt";\fP
 468 .fi     
 469 .nf     
 470 \f3   "<unnamed>"                                        \-> "java\&.awt\&.event";\fP
 471 .fi     
 472 .nf     
 473 \f3   "<unnamed>"                                        \-> "java\&.beans";\fP
 474 .fi     
 475 .nf     
 476 \f3   "<unnamed>"                                        \-> "java\&.io";\fP
 477 .fi     
 478 .nf     
 479 \f3   "<unnamed>"                                        \-> "java\&.lang";\fP
 480 .fi     
 481 .nf     
 482 \f3   "<unnamed>"                                        \-> "java\&.net";\fP
 483 .fi     
 484 .nf     
 485 \f3   "<unnamed>"                                        \-> "java\&.util";\fP
 486 .fi     
 487 .nf     
 488 \f3   "<unnamed>"                                        \-> "java\&.util\&.logging";\fP
 489 .fi     
 490 .nf     
 491 \f3   "<unnamed>"                                        \-> "javax\&.swing";\fP
 492 .fi     
 493 .nf     
 494 \f3   "<unnamed>"                                        \-> "javax\&.swing\&.border";\fP
 495 .fi     
 496 .nf     
 497 \f3   "<unnamed>"                                        \-> "javax\&.swing\&.event";\fP
 498 .fi     
 499 .nf     
 500 \f3   "<unnamed>"                                        \-> "javax\&.swing\&.text";\fP
 501 .fi     
 502 .nf     
 503 \f3   "<unnamed>"                                        \-> "javax\&.swing\&.tree";\fP
 504 .fi     
 505 .nf     
 506 \f3   "<unnamed>"                                        \-> "javax\&.swing\&.undo";\fP
 507 .fi     
 508 .nf     
 509 \f3}\fP
 510 .fi     
 511 .nf     
 512 \f3\fP
 513 .fi     
 514 .nf     
 515 \f3$ cat dot/summary\&.dot\fP
 516 .fi     
 517 .nf     
 518 \f3digraph "summary" {\fP
 519 .fi     
 520 .nf     
 521 \f3   "Notepad\&.jar"                  \-> "rt\&.jar";\fP
 522 .fi     
 523 .nf     
 524 \f3}\fP
 525 .fi     
 526 .nf     
 527 \f3\fP
 528 .fi     
 529 .sp     
 530 .SH SEE\ ALSO    
 531 .TP 0.2i    
 532 \(bu
 533 javap(1)
 534 .RE
 535 .br
 536 'pl 8.5i
 537 'bp
< prev index next >