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