javac.1 51.5 KB
Newer Older
R
rgallard 已提交
1
'\" t
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
.\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
.\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
.\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation.
.\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
.\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code).
.\"
.\" You should have received a copy of the GNU General Public License version
.\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
.\" or visit www.oracle.com if you need additional information or have any
.\" questions.
.\"
.\" Title: javac
.\" Language: English
.\" Date: 8 August 2014
.\" SectDesc: Basic Tools
.\" Software: JDK 8
.\" Arch: generic
.\" Part Number: E38207-03
R
rgallard 已提交
31 32
.\"
.if n .pl 99999
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
.TH "javac" "1" "8 August 2014" "JDK 8" "Basic Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
R
rgallard 已提交
54
javac \- Reads Java class and interface definitions and compiles them into bytecode and class files\&.
55 56 57 58 59 60
.SH "SYNOPSIS"
.sp
.if n \{\
.RS 4
.\}
.nf
R
rgallard 已提交
61
\fBjavac\fR [ \fIoptions\fR ] [ \fIsourcefiles\fR ] [ \fIclasses\fR] [ \fI@argfiles\fR ]
62 63 64 65 66
.fi
.if n \{\
.RE
.\}
.PP
R
rgallard 已提交
67
Arguments can be in any order:
68
.PP
R
rgallard 已提交
69
\fIoptions\fR
70 71 72 73
.RS 4
Command\-line options\&. See Options\&.
.RE
.PP
R
rgallard 已提交
74
\fIsourcefiles\fR
75 76 77 78 79
.RS 4
One or more source files to be compiled (such as
\fBMyClass\&.java\fR)\&.
.RE
.PP
R
rgallard 已提交
80
\fIclasses\fR
81 82 83 84 85
.RS 4
One or more classes to be processed for annotations (such as
\fBMyPackage\&.MyClass\fR)\&.
.RE
.PP
R
rgallard 已提交
86
\fI@argfiles\fR
87 88 89 90 91 92 93 94 95 96 97 98
.RS 4
One or more files that list options and source files\&. The
\fB\-J\fR
options are not allowed in these files\&. See Command\-Line Argument Files\&.
.RE
.SH "DESCRIPTION"
.PP
The
\fBjavac\fR
command reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files\&. The
\fBjavac\fR
command can also process annotations in Java source files and classes\&.
R
rgallard 已提交
99
.PP
100 101 102 103 104 105 106 107 108 109 110
There are two ways to pass source code file names to
\fBjavac\fR\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
111
For a small number of source files, list the file names on the command line\&.
112 113 114 115 116 117 118 119 120 121 122 123 124 125
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
For a large number of source files, list the file names in a file that is separated by blanks or line breaks\&. Use the list file name preceded by an at sign (@) with the
\fBjavac\fR
command\&.
.RE
R
rgallard 已提交
126
.PP
127 128 129 130 131 132
Source code file names must have \&.java suffixes, class file names must have \&.class suffixes, and both source and class files must have root names that identify the class\&. For example, a class called
\fBMyClass\fR
would be written in a source file called
\fBMyClass\&.java\fR
and compiled into a bytecode class file called
\fBMyClass\&.class\fR\&.
R
rgallard 已提交
133
.PP
134 135
Inner class definitions produce additional class files\&. These class files have names that combine the inner and outer class names, such as
\fBMyClass$MyInnerClass\&.class\fR\&.
R
rgallard 已提交
136
.PP
137 138 139 140 141
Arrange source files in a directory tree that reflects their package tree\&. For example, if all of your source files are in
\fB/workspace\fR, then put the source code for
\fBcom\&.mysoft\&.mypack\&.MyClass\fR
in
\fB/workspace/com/mysoft/mypack/MyClass\&.java\fR\&.
R
rgallard 已提交
142
.PP
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
By default, the compiler puts each class file in the same directory as its source file\&. You can specify a separate destination directory with the
\fB\-d\fR
option\&.
.SH "OPTIONS"
.PP
The compiler has a set of standard options that are supported on the current development environment\&. An additional set of nonstandard options are specific to the current virtual machine and compiler implementations and are subject to change in the future\&. Nonstandard options begin with the
\fB\-X\fR
option\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
See also Cross\-Compilation Options
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
171
See also Nonstandard Options
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
.RE
.SS "Standard Options"
.PP
\-A\fIkey\fR[\fI=value\fR]
.RS 4
Specifies options to pass to annotation processors\&. These options are not interpreted by
\fBjavac\fR
directly, but are made available for use by individual processors\&. The
\fBkey\fR
value should be one or more identifiers separated by a dot (\&.)\&.
.RE
.PP
\-cp \fIpath\fR or \-classpath \fIpath\fR
.RS 4
Specifies where to find user class files, and (optionally) annotation processors and source files\&. This class path overrides the user class path in the
\fBCLASSPATH\fR
environment variable\&. If neither
\fBCLASSPATH\fR,
\fB\-cp\fR
nor
\fB\-classpath\fR
is specified, then the user
\fIclass path\fR
is the current directory\&. See Setting the Class Path \&.
.sp
If the
\fB\-sourcepath\fR
option is not specified, then the user class path is also searched for source files\&.
.sp
If the
\fB\-processorpath\fR
option is not specified, then the class path is also searched for annotation processors\&.
.RE
.PP
\-Djava\&.ext\&.dirs=\fIdirectories\fR
.RS 4
R
rgallard 已提交
208
Overrides the location of installed extensions\&.
209 210 211 212
.RE
.PP
\-Djava\&.endorsed\&.dirs=\fIdirectories\fR
.RS 4
R
rgallard 已提交
213
Overrides the location of the endorsed standards path\&.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
.RE
.PP
\-d \fIdirectory\fR
.RS 4
Sets the destination directory for class files\&. The directory must already exist because
\fBjavac\fR
does not create it\&. If a class is part of a package, then
\fBjavac\fR
puts the class file in a subdirectory that reflects the package name and creates directories as needed\&.
.sp
If you specify
\fB\-d\fR
\fB/home/myclasses\fR
and the class is called
\fBcom\&.mypackage\&.MyClass\fR, then the class file is
\fB/home/myclasses/com/mypackage/MyClass\&.class\fR\&.
.sp
If the
\fI\-d\fR
option is not specified, then
\fBjavac\fR
puts each class file in the same directory as the source file from which it was generated\&.
.sp
\fBNote:\fR
The directory specified by the
\fI\-d\fR
option is not automatically added to your user class path\&.
.RE
.PP
\-deprecation
.RS 4
Shows a description of each use or override of a deprecated member or class\&. Without the
\fB\-deprecation\fR
option,
\fBjavac\fR
shows a summary of the source files that use or override deprecated members or classes\&. The
\fB\-deprecation\fR
option is shorthand for
\fB\-Xlint:deprecation\fR\&.
.RE
.PP
\-encoding \fIencoding\fR
.RS 4
Sets the source file encoding name, such as EUC\-JP and UTF\-8\&. If the
\fB\-encoding\fR
option is not specified, then the platform default converter is used\&.
.RE
.PP
\-endorseddirs \fIdirectories\fR
.RS 4
R
rgallard 已提交
264
Overrides the location of the endorsed standards path\&.
265 266 267 268 269 270 271 272 273 274 275 276 277
.RE
.PP
\-extdirs \fIdirectories\fR
.RS 4
Overrides the location of the
\fBext\fR
directory\&. The directories variable is a colon\-separated list of directories\&. Each JAR file in the specified directories is searched for class files\&. All JAR files found become part of the class path\&.
.sp
If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), then this option specifies the directories that contain the extension classes\&. See Cross\-Compilation Options for more information\&.
.RE
.PP
\-g
.RS 4
R
rgallard 已提交
278
Generates all debugging information, including local variables\&. By default, only line number and source file information is generated\&.
279 280 281 282
.RE
.PP
\-g:none
.RS 4
R
rgallard 已提交
283
Does not generate any debugging information\&.
284 285 286 287
.RE
.PP
\-g:[\fIkeyword list\fR]
.RS 4
R
rgallard 已提交
288
Generates only some kinds of debugging information, specified by a comma separated list of keywords\&. Valid keywords are:
289
.PP
290
source
291
.RS 4
R
rgallard 已提交
292
Source file debugging information\&.
293 294
.RE
.PP
295
lines
296
.RS 4
R
rgallard 已提交
297
Line number debugging information\&.
298 299
.RE
.PP
300
vars
301
.RS 4
R
rgallard 已提交
302
Local variable debugging information\&.
303 304 305 306 307
.RE
.RE
.PP
\-help
.RS 4
R
rgallard 已提交
308
Prints a synopsis of standard options\&.
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
.RE
.PP
\-implicit:[\fIclass, none\fR]
.RS 4
Controls the generation of class files for implicitly loaded source files\&. To automatically generate class files, use
\fB\-implicit:class\fR\&. To suppress class file generation, use
\fB\-implicit:none\fR\&. If this option is not specified, then the default is to automatically generate class files\&. In this case, the compiler issues a warning if any such class files are generated when also doing annotation processing\&. The warning is not issued when the
\fB\-implicit\fR
option is set explicitly\&. See Searching for Types\&.
.RE
.PP
\-J\fIoption\fR
.RS 4
Passes
\fBoption\fR
to the Java Virtual Machine (JVM), where option is one of the options described on the reference page for the Java launcher\&. For example,
\fB\-J\-Xms48m\fR
sets the startup memory to 48 MB\&. See
java(1)\&.
.sp
\fBNote:\fR
The
\fICLASSPATH\fR,
\fB\-classpath\fR,
\fB\-bootclasspath\fR, and
\fB\-extdirs\fR
options do not specify the classes used to run
\fBjavac\fR\&. Trying to customize the compiler implementation with these options and variables is risky and often does not accomplish what you want\&. If you must customize the complier implementation, then use the
\fB\-J\fR
option to pass options through to the underlying Java launcher\&.
.RE
.PP
\-nowarn
.RS 4
Disables warning messages\&. This option operates the same as the
\fB\-Xlint:none\fR
option\&.
.RE
.PP
\-parameters
.RS 4
Stores formal parameter names of constructors and methods in the generated class file so that the method
\fBjava\&.lang\&.reflect\&.Executable\&.getParameters\fR
from the Reflection API can retrieve them\&.
.RE
.PP
\-proc: [\fInone\fR, \fIonly\fR]
.RS 4
Controls whether annotation processing and compilation are done\&.
\fB\-proc:none\fR
means that compilation takes place without annotation processing\&.
\fB\-proc:only\fR
means that only annotation processing is done, without any subsequent compilation\&.
.RE
.PP
\-processor \fIclass1\fR [,\fIclass2\fR,\fIclass3\fR\&.\&.\&.]
.RS 4
R
rgallard 已提交
366
Names of the annotation processors to run\&. This bypasses the default discovery process\&.
367 368 369 370
.RE
.PP
\-processorpath \fIpath\fR
.RS 4
R
rgallard 已提交
371
Specifies where to find annotation processors\&. If this option is not used, then the class path is searched for processors\&.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
.RE
.PP
\-s \fIdir\fR
.RS 4
Specifies the directory where to place the generated source files\&. The directory must already exist because
\fBjavac\fR
does not create it\&. If a class is part of a package, then the compiler puts the source file in a subdirectory that reflects the package name and creates directories as needed\&.
.sp
If you specify
\fB\-s /home/mysrc\fR
and the class is called
\fBcom\&.mypackage\&.MyClass\fR, then the source file is put in
\fB/home/mysrc/com/mypackage/MyClass\&.java\fR\&.
.RE
.PP
\-source \fIrelease\fR
.RS 4
Specifies the version of source code accepted\&. The following values for
\fBrelease\fR
are allowed:
.PP
R
rgallard 已提交
393
1\&.3
394
.RS 4
R
rgallard 已提交
395
The compiler does not support assertions, generics, or other language features introduced after Java SE 1\&.3\&.
396 397
.RE
.PP
R
rgallard 已提交
398
1\&.4
399
.RS 4
R
rgallard 已提交
400
The compiler accepts code containing assertions, which were introduced in Java SE 1\&.4\&.
401 402
.RE
.PP
R
rgallard 已提交
403
1\&.5
404
.RS 4
R
rgallard 已提交
405
The compiler accepts code containing generics and other language features introduced in Java SE 5\&.
406 407
.RE
.PP
408
5
409
.RS 4
R
rgallard 已提交
410
Synonym for 1\&.5\&.
411 412
.RE
.PP
R
rgallard 已提交
413
1\&.6
414
.RS 4
R
rgallard 已提交
415
No language changes were introduced in Java SE 6\&. However, encoding errors in source files are now reported as errors instead of warnings as in earlier releases of Java Platform, Standard Edition\&.
416 417
.RE
.PP
418
6
419
.RS 4
R
rgallard 已提交
420
Synonym for 1\&.6\&.
421 422
.RE
.PP
R
rgallard 已提交
423
1\&.7
424 425 426 427
.RS 4
The compiler accepts code with features introduced in Java SE 7\&.
.RE
.PP
428
7
429
.RS 4
R
rgallard 已提交
430
Synonym for 1\&.7\&.
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
.RE
.PP
1\&.8
.RS 4
This is the default value\&. The compiler accepts code with features introduced in Java SE 8\&.
.RE
.PP
8
.RS 4
Synonym for 1\&.8\&.
.RE
.RE
.PP
\-sourcepath \fIsourcepath\fR
.RS 4
R
rgallard 已提交
446
Specifies the source code path to search for class or interface definitions\&. As with the user class path, source path entries are separated by colons (:) on Oracle Solaris and semicolons on Windows and can be directories, JAR archives, or ZIP archives\&. If packages are used, then the local path name within the directory or archive must reflect the package name\&.
447 448 449 450 451 452 453
.sp
\fBNote:\fR
Classes found through the class path might be recompiled when their source files are also found\&. See Searching for Types\&.
.RE
.PP
\-verbose
.RS 4
R
rgallard 已提交
454
Uses verbose output, which includes information about each class loaded and each source file compiled\&.
455 456 457 458
.RE
.PP
\-version
.RS 4
R
rgallard 已提交
459
Prints release information\&.
460 461 462 463
.RE
.PP
\-werror
.RS 4
R
rgallard 已提交
464
Terminates compilation when warnings occur\&.
465 466 467 468
.RE
.PP
\-X
.RS 4
R
rgallard 已提交
469
Displays information about nonstandard options and exits\&.
470 471
.RE
.SS "Cross\-Compilation Options"
R
rgallard 已提交
472
.PP
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
By default, classes are compiled against the bootstrap and extension classes of the platform that
\fBjavac\fR
shipped with\&. But
\fBjavac\fR
also supports cross\-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation\&. It is important to use the
\fB\-bootclasspath\fR
and
\fB\-extdirs\fR
options when cross\-compiling\&.
.PP
\-target \fIversion\fR
.RS 4
Generates class files that target a specified release of the virtual machine\&. Class files will run on the specified target and on later releases, but not on earlier releases of the JVM\&. Valid targets are 1\&.1, 1\&.2, 1\&.3, 1\&.4, 1\&.5 (also 5), 1\&.6 (also 6), 1\&.7 (also 7), and 1\&.8 (also 8)\&.
.sp
The default for the
\fB\-target\fR
option depends on the value of the
\fB\-source\fR
option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is not specified, then the value of the
\fB\-target\fR
option is 1\&.8
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is 1\&.2, then the value of the
\fB\-target\fR
option is 1\&.4
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is 1\&.3, then the value of the
\fB\-target\fR
option is 1\&.4
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is 1\&.5, then the value of the
\fB\-target\fR
option is 1\&.8
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is 1\&.6, then the value of the
\fB\-target\fR
is option 1\&.8
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the
\fB\-source\fR
option is 1\&.7, then the value of the
\fB\-target\fR
is option 1\&.8
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
For all other values of the
\fB\-source\fR
option, the value of the
\fB\-target\fR
option is the value of the
\fB\-source\fR
option\&.
.RE
.RE
.PP
\-bootclasspath \fIbootclasspath\fR
.RS 4
Cross\-compiles against the specified set of boot classes\&. As with the user class path, boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives\&.
.RE
.SS "Compact Profile Option"
.PP
Beginning with JDK 8, the
\fBjavac\fR
compiler supports compact profiles\&. With compact profiles, applications that do not require the entire Java platform can be deployed and run with a smaller footprint\&. The compact profiles feature could be used to shorten the download time for applications from app stores\&. This feature makes for more compact deployment of Java applications that bundle the JRE\&. This feature is also useful in small devices\&.
.PP
The supported profile values are
\fBcompact1\fR,
\fBcompact2\fR, and
\fBcompact3\fR\&. These are additive layers\&. Each higher\-numbered compact profile contains all of the APIs in profiles with smaller number names\&.
.PP
\-profile
.RS 4
R
rgallard 已提交
618
When using compact profiles, this option specifies the profile name when compiling\&. For example:
619 620 621 622 623 624 625 626 627 628 629
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-profile compact1 Hello\&.java\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
630
javac does not compile source code that uses any Java SE APIs that is not in the specified profile\&. Here is an example of the error message that results from attempting to compile such source code:
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
.sp
.if n \{\
.RS 4
.\}
.nf
\fBcd jdk1\&.8\&.0/bin\fR
\fB\&./javac \-profile compact1 Paint\&.java\fR
\fBPaint\&.java:5: error: Applet is not available in profile \*(Aqcompact1\*(Aq\fR
\fBimport java\&.applet\&.Applet;\fR
 
.fi
.if n \{\
.RE
.\}
In this example, you can correct the error by modifying the source to not use the
\fBApplet\fR
class\&. You could also correct the error by compiling without the \-profile option\&. Then the compilation would be run against the full set of Java SE APIs\&. (None of the compact profiles include the
\fBApplet\fR
class\&.)
.sp
An alternative way to compile with compact profiles is to use the
\fB\-bootclasspath\fR
option to specify a path to an
\fBrt\&.jar\fR
file that specifies a profile\*(Aqs image\&. Using the
\fB\-profile\fR
option instead does not require a profile image to be present on the system at compile time\&. This is useful when cross\-compiling\&.
.RE
.SS "Nonstandard Options"
.PP
\-Xbootclasspath/p:\fIpath\fR
.RS 4
R
rgallard 已提交
663
Adds a suffix to the bootstrap class path\&.
664 665 666 667
.RE
.PP
\-Xbootclasspath/a:\fIpath\fR
.RS 4
R
rgallard 已提交
668
Adds a prefix to the bootstrap class path\&.
669 670 671 672
.RE
.PP
\-Xbootclasspath/:\fIpath\fR
.RS 4
R
rgallard 已提交
673
Overrides the location of the bootstrap class files\&.
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716
.RE
.PP
\-Xdoclint:[\-]\fIgroup\fR [\fI/access\fR]
.RS 4
Enables or disables specific groups of checks, where
\fIgroup\fR
is one of the following values:
\fBaccessibility\fR,
\fBsyntax\fR,
\fBreference\fR,
\fBhtml\fR
or
\fBmissing\fR\&. For more information about these groups of checks see the
\fB\-Xdoclint\fR
option of the
\fBjavadoc\fR
command\&. The
\fB\-Xdoclint\fR
option is disabled by default in the
\fBjavac\fR
command\&.
.sp
The variable
\fIaccess\fR
specifies the minimum visibility level of classes and members that the
\fB\-Xdoclint\fR
option checks\&. It can have one of the following values (in order of most to least visible) :
\fBpublic\fR,
\fBprotected\fR,
\fBpackage\fR
and
\fBprivate\fR\&. For example, the following option checks classes and members (with all groups of checks) that have the access level protected and higher (which includes protected, package and public):
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-Xdoclint:all/protected\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
717
The following option enables all groups of checks for all access levels, except it will not check for HTML errors for classes and members that have access level package and higher (which includes package and public):
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-Xdoclint:all,\-html/package\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
\-Xdoclint:none
.RS 4
R
rgallard 已提交
733
Disables all groups of checks\&.
734 735 736 737
.RE
.PP
\-Xdoclint:all[\fI/access\fR]
.RS 4
R
rgallard 已提交
738
Enables all groups of checks\&.
739 740 741 742 743 744 745 746 747 748 749 750 751 752
.RE
.PP
\-Xlint
.RS 4
Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
.RE
.PP
\-Xlint:all
.RS 4
Enables all recommended warnings\&. In this release, enabling all available warnings is recommended\&.
.RE
.PP
\-Xlint:none
.RS 4
R
rgallard 已提交
753
Disables all warnings\&.
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
.RE
.PP
\-Xlint:\fIname\fR
.RS 4
Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option for a list of warnings you can disable with this option\&.
.RE
.PP
\-Xlint:\fI\-name\fR
.RS 4
Disables warning name\&. See Enable or Disable Warnings with the \-Xlint Option with the
\fB\-Xlint\fR
option to get a list of warnings that you can disable with this option\&.
.RE
.PP
\-Xmaxerrs \fInumber\fR
.RS 4
R
rgallard 已提交
770
Sets the maximum number of errors to print\&.
771 772 773 774
.RE
.PP
\-Xmaxwarns \fInumber\fR
.RS 4
R
rgallard 已提交
775
Sets the maximum number of warnings to print\&.
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
.RE
.PP
\-Xstdout \fIfilename\fR
.RS 4
Sends compiler messages to the named file\&. By default, compiler messages go to
\fBSystem\&.err\fR\&.
.RE
.PP
\-Xprefer:[\fInewer,source\fR]
.RS 4
Specifies which file to read when both a source file and class file are found for a type\&. (See Searching for Types)\&. If the
\fB\-Xprefer:newer\fR
option is used, then it reads the newer of the source or class file for a type (default)\&. If the
\fB\-Xprefer:source\fR
option is used, then it reads the source file\&. Use \-\fBXprefer:source\fR
when you want to be sure that any annotation processors can access annotations declared with a retention policy of
\fBSOURCE\fR\&.
.RE
.PP
\-Xpkginfo:[\fIalways\fR,\fIlegacy\fR,\fInonempty\fR]
.RS 4
Control whether javac generates
\fBpackage\-info\&.class\fR
files from package\-info\&.java files\&. Possible mode arguments for this option include the following\&.
.PP
R
rgallard 已提交
801
always
802 803 804 805 806 807 808 809 810 811 812 813
.RS 4
Always generate a
\fBpackage\-info\&.class\fR
file for every
\fBpackage\-info\&.java\fR
file\&. This option may be useful if you use a build system such as Ant, which checks that each
\fB\&.java\fR
file has a corresponding
\fB\&.class\fR
file\&.
.RE
.PP
R
rgallard 已提交
814
legacy
815 816 817 818 819 820 821 822 823 824 825 826 827 828
.RS 4
Generate a
\fBpackage\-info\&.class\fR
file only if package\-info\&.java contains annotations\&. Don\*(Aqt generate a
\fBpackage\-info\&.class\fR
file if package\-info\&.java only contains comments\&.
.sp
\fBNote:\fR
A
\fBpackage\-info\&.class\fR
file might be generated but be empty if all the annotations in the package\-info\&.java file have
\fBRetentionPolicy\&.SOURCE\fR\&.
.RE
.PP
R
rgallard 已提交
829
nonempty
830 831 832 833 834 835 836 837 838 839 840 841
.RS 4
Generate a
\fBpackage\-info\&.class\fR
file only if package\-info\&.java contains annotations with
\fBRetentionPolicy\&.CLASS\fR
or
\fBRetentionPolicy\&.RUNTIME\fR\&.
.RE
.RE
.PP
\-Xprint
.RS 4
R
rgallard 已提交
842
Prints a textual representation of specified types for debugging purposes\&. Perform neither annotation processing nor compilation\&. The format of the output could change\&.
843 844 845 846
.RE
.PP
\-XprintProcessorInfo
.RS 4
R
rgallard 已提交
847
Prints information about which annotations a processor is asked to process\&.
848 849 850 851
.RE
.PP
\-XprintRounds
.RS 4
R
rgallard 已提交
852
Prints information about initial and subsequent annotation processing rounds\&.
853 854 855 856 857 858 859 860 861 862 863 864 865
.RE
.SH "ENABLE OR DISABLE WARNINGS WITH THE -XLINT OPTION"
.PP
Enable warning
\fIname\fR
with the
\fB\-Xlint:name\fR
option, where
\fBname\fR
is one of the following warning names\&. Note that you can disable a warning with the
\fB\-Xlint:\-name:\fR
option\&.
.PP
R
rgallard 已提交
866
cast
867
.RS 4
R
rgallard 已提交
868
Warns about unnecessary and redundant casts, for example:
869 870 871 872 873 874 875 876 877 878 879 880 881
.sp
.if n \{\
.RS 4
.\}
.nf
\fBString s = (String) "Hello!"\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
882
classfile
883
.RS 4
R
rgallard 已提交
884
Warns about issues related to class file contents\&.
885 886
.RE
.PP
R
rgallard 已提交
887
deprecation
888
.RS 4
R
rgallard 已提交
889
Warns about the use of deprecated items, for example:
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjava\&.util\&.Date myDate = new java\&.util\&.Date();\fR
\fBint currentDay = myDate\&.getDay();\fR
 
.fi
.if n \{\
.RE
.\}
The method
\fBjava\&.util\&.Date\&.getDay\fR
has been deprecated since JDK 1\&.1
.RE
.PP
dep\-ann
.RS 4
Warns about items that are documented with an
\fB@deprecated\fR
Javadoc comment, but do not have a
\fB@Deprecated\fR
annotation, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fB/**\fR
\fB  * @deprecated As of Java SE 7, replaced by {@link #newMethod()}\fR
\fB  */\fR
\fBpublic static void deprecatedMethood() { }\fR
\fBpublic static void newMethod() { }\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
931
divzero
932
.RS 4
R
rgallard 已提交
933
Warns about division by the constant integer 0, for example:
934 935 936 937 938 939 940 941 942 943 944 945 946
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint divideByZero = 42 / 0;\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
947
empty
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967
.RS 4
Warns about empty statements after
\fBif \fRstatements, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBclass E {\fR
\fB    void m() {\fR
\fB         if (true) ;\fR
\fB    }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
968
fallthrough
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992
.RS 4
Checks the switch blocks for fall\-through cases and provides a warning message for any that are found\&. Fall\-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to fall through from that case to the next case\&. For example, the code following the case 1 label in this switch block does not end with a break statement:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBswitch (x) {\fR
\fBcase 1:\fR
\fB  System\&.out\&.println("1");\fR
\fB  // No break statement here\&.\fR
\fBcase 2:\fR
\fB  System\&.out\&.println("2");\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
If the
\fB\-Xlint:fallthrough\fR
option was used when compiling this code, then the compiler emits a warning about possible fall\-through into case, with the line number of the case in question\&.
.RE
.PP
R
rgallard 已提交
993
finally
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
.RS 4
Warns about
\fBfinally\fR
clauses that cannot complete normally, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpublic static int m() {\fR
\fB  try {\fR
\fB     throw new NullPointerException();\fR
\fB  }  catch (NullPointerException(); {\fR
\fB     System\&.err\&.println("Caught NullPointerException\&.");\fR
\fB     return 1;\fR
\fB   } finally {\fR
\fB     return 0;\fR
\fB   }\fR
\fB  }\fR
 
.fi
.if n \{\
.RE
.\}
The compiler generates a warning for the
\fBfinally\fR
block in this example\&. When the
\fBint\fR
method is called, it returns a value of 0\&. A
\fBfinally\fR
block executes when the
\fBtry\fR
block exits\&. In this example, when control is transferred to the
\fBcatch\fR
block, the
\fBint\fR
method exits\&. However, the
\fBfinally\fR
block must execute, so it is executed, even though control was transferred outside the method\&.
.RE
.PP
R
rgallard 已提交
1035
options
1036 1037 1038 1039
.RS 4
Warns about issues that related to the use of command\-line options\&. See Cross\-Compilation Options\&.
.RE
.PP
R
rgallard 已提交
1040
overrides
1041
.RS 4
R
rgallard 已提交
1042
Warns about issues regarding method overrides\&. For example, consider the following two classes:
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpublic class ClassWithVarargsMethod {\fR
\fB  void varargsMethod(String\&.\&.\&. s) { }\fR
\fB}\fR
 
\fBpublic class ClassWithOverridingMethod extends ClassWithVarargsMethod {\fR
\fB   @Override\fR
\fB   void varargsMethod(String[] s) { }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
1061
The compiler generates a warning similar to the following:\&.
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
.sp
.if n \{\
.RS 4
.\}
.nf
\fBwarning: [override] varargsMethod(String[]) in ClassWithOverridingMethod \fR
\fBoverrides varargsMethod(String\&.\&.\&.) in ClassWithVarargsMethod; overriding\fR
\fBmethod is missing \*(Aq\&.\&.\&.\*(Aq\fR
 
.fi
.if n \{\
.RE
.\}
When the compiler encounters a
\fBvarargs\fR
method, it translates the
\fBvarargs\fR
formal parameter into an array\&. In the method
\fBClassWithVarargsMethod\&.varargsMethod\fR, the compiler translates the
\fBvarargs\fR
formal parameter
\fBString\&.\&.\&. s\fR
to the formal parameter
\fBString[] s\fR, an array, which matches the formal parameter of the method
\fBClassWithOverridingMethod\&.varargsMethod\fR\&. Consequently, this example compiles\&.
.RE
.PP
R
rgallard 已提交
1089
path
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106
.RS 4
Warns about invalid path elements and nonexistent path directories on the command line (with regard to the class path, the source path, and other paths)\&. Such warnings cannot be suppressed with the
\fB@SuppressWarnings\fR
annotation, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-Xlint:path \-classpath /nonexistentpath Example\&.java\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
1107
processing
1108
.RS 4
R
rgallard 已提交
1109
Warn about issues regarding annotation processing\&. The compiler generates this warning when you have a class that has an annotation, and you use an annotation processor that cannot handle that type of exception\&. For example, the following is a simple annotation processor:
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187
.sp
\fBSource file AnnocProc\&.java\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBimport java\&.util\&.*;\fR
\fBimport javax\&.annotation\&.processing\&.*;\fR
\fBimport javax\&.lang\&.model\&.*;\fR
\fBimport\&.javaz\&.lang\&.model\&.element\&.*;\fR
 
\fB@SupportedAnnotationTypes("NotAnno")\fR
\fBpublic class AnnoProc extends AbstractProcessor {\fR
\fB  public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv){\fR
\fB     return true;\fR
\fB  }\fR
 
\fB  public SourceVersion getSupportedSourceVersion() {\fR
\fB     return SourceVersion\&.latest();\fR
\fB   }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
\fBSource file AnnosWithoutProcessors\&.java\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
\fB@interface Anno { }\fR
\fB \fR
\fB@Anno\fR
\fBclass AnnosWithoutProcessors { }\fR
 
.fi
.if n \{\
.RE
.\}
The following commands compile the annotation processor
\fBAnnoProc\fR, then run this annotation processor against the source file
\fBAnnosWithoutProcessors\&.java\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac AnnoProc\&.java\fR
\fBjavac \-cp \&. \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors\&.java\fR
 
.fi
.if n \{\
.RE
.\}
When the compiler runs the annotation processor against the source file
\fBAnnosWithoutProcessors\&.java\fR, it generates the following warning:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBwarning: [processing] No processor claimed any of these annotations: Anno\fR
\fB \fR
.fi
.if n \{\
.RE
.\}
To resolve this issue, you can rename the annotation defined and used in the class
\fBAnnosWithoutProcessors\fR
from
\fBAnno\fR
to
\fBNotAnno\fR\&.
.RE
.PP
R
rgallard 已提交
1188
rawtypes
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231
.RS 4
Warns about unchecked operations on raw types\&. The following statement generates a
\fBrawtypes\fR
warning:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid countElements(List l) { \&.\&.\&. }\fR
 
.fi
.if n \{\
.RE
.\}
The following example does not generate a
\fBrawtypes\fR
warning
.sp
.if n \{\
.RS 4
.\}
.nf
\fBvoid countElements(List<?> l) { \&.\&.\&. }\fR
 
.fi
.if n \{\
.RE
.\}
\fBList\fR
is a raw type\&. However,
\fBList<?>\fR
is an unbounded wildcard parameterized type\&. Because
\fBList\fR
is a parameterized interface, always specify its type argument\&. In this example, the
\fBList\fR
formal argument is specified with an unbounded wildcard (\fB?\fR) as its formal type parameter, which means that the
\fBcountElements\fR
method can accept any instantiation of the
\fBList\fR
interface\&.
.RE
.PP
R
rgallard 已提交
1232
Serial
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258
.RS 4
Warns about missing
\fBserialVersionUID\fR
definitions on serializable classes, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpublic class PersistentTime implements Serializable\fR
\fB{\fR
\fB  private Date time;\fR
\fB \fR
\fB   public PersistentTime() {\fR
\fB     time = Calendar\&.getInstance()\&.getTime();\fR
\fB   }\fR
\fB \fR
\fB   public Date getTime() {\fR
\fB     return time;\fR
\fB   }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
1259
The compiler generates the following warning:
1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
.sp
.if n \{\
.RS 4
.\}
.nf
\fBwarning: [serial] serializable class PersistentTime has no definition of\fR
\fBserialVersionUID\fR
 
.fi
.if n \{\
.RE
.\}
If a serializable class does not explicitly declare a field named
\fBserialVersionUID\fR, then the serialization runtime environment calculates a default
\fBserialVersionUID\fR
value for that class based on various aspects of the class, as described in the Java Object Serialization Specification\&. However, it is strongly recommended that all serializable classes explicitly declare
\fBserialVersionUID\fR
values because the default process of computing
\fBserialVersionUID\fR
vales is highly sensitive to class details that can vary depending on compiler implementations, and as a result, might cause an unexpected
\fBInvalidClassExceptions\fR
during deserialization\&. To guarantee a consistent
\fBserialVersionUID\fR
value across different Java compiler implementations, a serializable class must declare an explicit
\fBserialVersionUID\fR
value\&.
.RE
.PP
R
rgallard 已提交
1288
static
1289
.RS 4
R
rgallard 已提交
1290
Warns about issues relating to the use of statics, for example:
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304
.sp
.if n \{\
.RS 4
.\}
.nf
\fBclass XLintStatic {\fR
\fB    static void m1() { }\fR
\fB    void m2() { this\&.m1(); }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
1305
The compiler generates the following warning:
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
.sp
.if n \{\
.RS 4
.\}
.nf
\fBwarning: [static] static method should be qualified by type name, \fR
\fBXLintStatic, instead of by an expression\fR
 
.fi
.if n \{\
.RE
.\}
To resolve this issue, you can call the
\fBstatic\fR
method
\fBm1\fR
as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBXLintStatic\&.m1();\fR
 
.fi
.if n \{\
.RE
.\}
Alternately, you can remove the
\fBstatic\fR
keyword from the declaration of the method
\fBm1\fR\&.
.RE
.PP
R
rgallard 已提交
1340
try
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
.RS 4
Warns about issues relating to use of
\fBtry\fR
blocks, including try\-with\-resources statements\&. For example, a warning is generated for the following statement because the resource
\fBac\fR
declared in the
\fBtry\fR
block is not used:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBtry ( AutoCloseable ac = getResource() ) {    // do nothing}\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
R
rgallard 已提交
1362
unchecked
1363
.RS 4
R
rgallard 已提交
1364
Gives more detail for unchecked conversion warnings that are mandated by the Java Language Specification, for example:
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423
.sp
.if n \{\
.RS 4
.\}
.nf
\fBList l = new ArrayList<Number>();\fR
\fBList<String> ls = l;       // unchecked warning\fR
 
.fi
.if n \{\
.RE
.\}
During type erasure, the types
\fBArrayList<Number>\fR
and
\fBList<String>\fR
become
\fBArrayList\fR
and
\fBList\fR, respectively\&.
.sp
The
\fBls\fR
command has the parameterized type
\fBList<String>\fR\&. When the
\fBList\fR
referenced by
\fBl\fR
is assigned to
\fBls\fR, the compiler generates an unchecked warning\&. At compile time, the compiler and JVM cannot determine whether
\fBl\fR
refers to a
\fBList<String>\fR
type\&. In this case,
\fBl\fR
does not refer to a
\fBList<String>\fR
type\&. As a result, heap pollution occurs\&.
.sp
A heap pollution situation occurs when the
\fBList\fR
object
\fBl\fR, whose static type is
\fBList<Number>\fR, is assigned to another
\fBList\fR
object,
\fBls\fR, that has a different static type,
\fBList<String>\fR\&. However, the compiler still allows this assignment\&. It must allow this assignment to preserve backward compatibility with releases of Java SE that do not support generics\&. Because of type erasure,
\fBList<Number>\fR
and
\fBList<String>\fR
both become
\fBList\fR\&. Consequently, the compiler allows the assignment of the object
\fBl\fR\fB,\fR
which has a raw type of
\fBList\fR, to the object
\fBls\fR\&.
.RE
.PP
1424
varargs
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485
.RS 4
Warns about unsafe usages of variable arguments (\fBvarargs\fR) methods, in particular, those that contain non\-reifiable arguments, for example:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpublic class ArrayBuilder {\fR
\fB  public static <T> void addToList (List<T> listArg, T\&.\&.\&. elements) {\fR
\fB    for (T x : elements) {\fR
\fB      listArg\&.add(x);\fR
\fB    }\fR
\fB  }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
\fBNote:\fR
A non\-reifiable type is a type whose type information is not fully available at runtime\&.
.sp
The compiler generates the following warning for the definition of the method
\fBArrayBuilder\&.addToList\fR
.sp
.if n \{\
.RS 4
.\}
.nf
\fBwarning: [varargs] Possible heap pollution from parameterized vararg type T\fR
 
.fi
.if n \{\
.RE
.\}
When the compiler encounters a varargs method, it translates the
\fBvarargs\fR
formal parameter into an array\&. However, the Java programming language does not permit the creation of arrays of parameterized types\&. In the method
\fBArrayBuilder\&.addToList\fR, the compiler translates the
\fBvarargs\fR
formal parameter
\fBT\&.\&.\&.\fR
elements to the formal parameter
\fBT[]\fR
elements, an array\&. However, because of type erasure, the compiler converts the
\fBvarargs\fR
formal parameter to
\fBObject[]\fR
elements\&. Consequently, there is a possibility of heap pollution\&.
.RE
.SH "COMMAND-LINE ARGUMENT FILES"
.PP
To shorten or simplify the
\fBjavac\fR
command, you can specify one or more files that contain arguments to the
\fBjavac\fR
command (except
\fB\-J\fR
options)\&. This enables you to create
\fBjavac\fR
commands of any length on any operating system\&.
R
rgallard 已提交
1486
.PP
1487 1488 1489
An argument file can include
\fBjavac\fR
options and source file names in any combination\&. The arguments within a file can be separated by spaces or new line characters\&. If a file name contains embedded spaces, then put the whole file name in double quotation marks\&.
R
rgallard 已提交
1490
.PP
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523
File Names within an argument file are relative to the current directory, not the location of the argument file\&. Wild cards (*) are not allowed in these lists (such as for specifying
\fB*\&.java\fR)\&. Use of the at sign (@) to recursively interpret files is not supported\&. The
\fB\-J\fR
options are not supported because they are passed to the launcher, which does not support argument files\&.
.PP
When executing the
\fBjavac\fR
command, pass in the path and name of each argument file with the at sign (@) leading character\&. When the
\fBjavac\fR
command encounters an argument beginning with the at sign (@), it expands the contents of that file into the argument list\&.
.PP
\fBExample 1\fR
.br
Single Argument File
.RS 4
You could use a single argument file named
\fBargfile\fR
to hold all
\fBjavac\fR
arguments:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac @argfile\fR
 
.fi
.if n \{\
.RE
.\}
This argument file could contain the contents of both files shown in Example 2
.RE
R
rgallard 已提交
1524
.PP
1525 1526 1527 1528 1529 1530 1531 1532
\fBExample 2\fR
.br
Two Argument Files
.RS 4
You can create two argument files: one for the
\fBjavac\fR
options and the other for the source file names\&. Note that the following lists have no line\-continuation characters\&.
.sp
R
rgallard 已提交
1533
Create a file named options that contains the following:
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-d classes\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-g\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fB\-sourcepath /java/pubs/ws/1\&.3/src/share/classes\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
1574
Create a file named classes that contains the following:
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644
.sp
.if n \{\
.RS 4
.\}
.nf
\fBMyClass1\&.java\fR
\fBMyClass2\&.java\fR
\fBMyClass3\&.java\fR
 
.fi
.if n \{\
.RE
.\}
Then, run the
\fBjavac\fR
command as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac @options @classes\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample 3\fR
.br
Argument Files with Paths
.RS 4
The argument files can have paths, but any file names inside the files are relative to the current working directory (not
\fBpath1\fR
or
\fBpath2\fR):
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac @path1/options @path2/classes\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.SH "ANNOTATION PROCESSING"
.PP
The
\fBjavac\fR
command provides direct support for annotation processing, superseding the need for the separate annotation processing command,
\fBapt\fR\&.
.PP
The API for annotation processors is defined in the
\fBjavax\&.annotation\&.processing\fR
and j\fBavax\&.lang\&.model\fR
packages and subpackages\&.
.SS "How Annotation Processing Works"
.PP
Unless annotation processing is disabled with the
\fB\-proc:none\fR
option, the compiler searches for any annotation processors that are available\&. The search path can be specified with the
\fB\-processorpath\fR
option\&. If no path is specified, then the user class path is used\&. Processors are located by means of service provider\-configuration files named
\fBMETA\-INF/services/javax\&.annotation\&.processing\fR\&.Processor on the search path\&. Such files should contain the names of any annotation processors to be used, listed one per line\&. Alternatively, processors can be specified explicitly, using the
\fB\-processor\fR
option\&.
R
rgallard 已提交
1645 1646 1647 1648 1649
.PP
After scanning the source files and classes on the command line to determine what annotations are present, the compiler queries the processors to determine what annotations they process\&. When a match is found, the processor is called\&. A processor can claim the annotations it processes, in which case no further attempt is made to find any processors for those annotations\&. After all of the annotations are claimed, the compiler does not search for additional processors\&.
.PP
If any processors generate new source files, then another round of annotation processing occurs: Any newly generated source files are scanned, and the annotations processed as before\&. Any processors called on previous rounds are also called on all subsequent rounds\&. This continues until no new source files are generated\&.
.PP
1650 1651 1652 1653 1654 1655 1656 1657 1658 1659
After a round occurs where no new source files are generated, the annotation processors are called one last time, to give them a chance to complete any remaining work\&. Finally, unless the
\fB\-proc:only\fR
option is used, the compiler compiles the original and all generated source files\&.
.SS "Implicitly Loaded Source Files"
.PP
To compile a set of source files, the compiler might need to implicitly load additional source files\&. See Searching for Types\&. Such files are currently not subject to annotation processing\&. By default, the compiler gives a warning when annotation processing occurred and any implicitly loaded source files are compiled\&. The
\fB\-implicit\fR
option provides a way to suppress the warning\&.
.SH "SEARCHING FOR TYPES"
.PP
R
rgallard 已提交
1660 1661
To compile a source file, the compiler often needs information about a type, but the type definition is not in the source files specified on the command line\&. The compiler needs type information for every class or interface used, extended, or implemented in the source file\&. This includes classes and interfaces not explicitly mentioned in the source file, but that provide information through inheritance\&.
.PP
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815
For example, when you create a subclass
\fBjava\&.applet\&.Applet\fR, you are also using the ancestor classes of
\fBApplet\fR:
\fBjava\&.awt\&.Panel\fR,
\fBjava\&.awt\&.Container\fR,
\fBjava\&.awt\&.Component\fR, and
\fBjava\&.lang\&.Object\fR\&.
.PP
When the compiler needs type information, it searches for a source file or class file that defines the type\&. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory)\&. The user class path is defined by setting the
\fBCLASSPATH\fR
environment variable or by using the
\fB\-classpath\fR
option\&.
.PP
If you set the
\fB\-sourcepath\fR
option, then the compiler searches the indicated path for source files\&. Otherwise, the compiler searches the user class path for both class files and source files\&.
.PP
You can specify different bootstrap or extension classes with the
\fB\-bootclasspath\fR
and the
\fB\-extdirs\fR
options\&. See Cross\-Compilation Options\&.
.PP
A successful type search may produce a class file, a source file, or both\&. If both are found, then you can use the
\fB\-Xprefer\fR
option to instruct the compiler which to use\&. If
\fBnewer\fR
is specified, then the compiler uses the newer of the two files\&. If
\fBsource\fR
is specified, the compiler uses the source file\&. The default is
\fBnewer\fR\&.
.PP
If a type search finds a source file for a required type, either by itself, or as a result of the setting for the
\fB\-Xprefer\fR
option, then the compiler reads the source file to get the information it needs\&. By default the compiler also compiles the source file\&. You can use the
\fB\-implicit\fR
option to specify the behavior\&. If
\fBnone\fR
is specified, then no class files are generated for the source file\&. If
\fBclass\fR
is specified, then class files are generated for the source file\&.
.PP
The compiler might not discover the need for some type information until after annotation processing completes\&. When the type information is found in a source file and no
\fB\-implicit\fR
option is specified, the compiler gives a warning that the file is being compiled without being subject to annotation processing\&. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the
\fB\-implicit\fR
option to specify whether or not class files should be generated for such source files\&.
.SH "PROGRAMMATIC INTERFACE"
.PP
The
\fBjavac\fR
command supports the new Java Compiler API defined by the classes and interfaces in the
\fBjavax\&.tools\fR
package\&.
.SS "Example"
.PP
To compile as though providing command\-line arguments, use the following syntax:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBJavaCompiler javac = ToolProvider\&.getSystemJavaCompiler();\fR
 
.fi
.if n \{\
.RE
.\}
.PP
The example writes diagnostics to the standard output stream and returns the exit code that
\fBjavac\fR
would give when called from the command line\&.
.PP
You can use other methods in the
\fBjavax\&.tools\&.JavaCompiler\fR
interface to handle diagnostics, control where files are read from and written to, and more\&.
.SS "Old Interface"
.PP
\fBNote:\fR
This API is retained for backward compatibility only\&. All new code should use the newer Java Compiler API\&.
.PP
The
\fBcom\&.sun\&.tools\&.javac\&.Main\fR
class provides two static methods to call the compiler from a program:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpublic static int compile(String[] args);\fR
\fBpublic static int compile(String[] args, PrintWriter out);\fR
 
.fi
.if n \{\
.RE
.\}
.PP
The
\fBargs\fR
parameter represents any of the command\-line arguments that would typically be passed to the compiler\&.
.PP
The
\fBout\fR
parameter indicates where the compiler diagnostic output is directed\&.
.PP
The
\fBreturn\fR
value is equivalent to the
\fBexit\fR
value from
\fBjavac\fR\&.
.PP
\fBNote:\fR
All other classes and methods found in a package with names that start with
\fBcom\&.sun\&.tools\&.javac\fR
(subpackages of
\fBcom\&.sun\&.tools\&.javac\fR) are strictly internal and subject to change at any time\&.
.SH "EXAMPLES"
.PP
\fBExample 1\fR
.br
Compile a Simple Program
.RS 4
This example shows how to compile the
\fBHello\&.java\fR
source file in the greetings directory\&. The class defined in
\fBHello\&.java\fR
is called
\fBgreetings\&.Hello\fR\&. The greetings directory is the package directory both for the source file and the class file and is underneath the current directory\&. This makes it possible to use the default user class path\&. It also makes it unnecessary to specify a separate destination directory with the
\fB\-d\fR
option\&.
.sp
The source code in
\fBHello\&.java\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpackage greetings;\fR
\fB \fR
\fBpublic class Hello {\fR
\fB    public static void main(String[] args) {\fR
\fB        for (int i=0; i < args\&.length; i++) {\fR
\fB            System\&.out\&.println("Hello " + args[i]);\fR
\fB        }\fR
\fB    }\fR
\fB}\fR
 
.fi
.if n \{\
.RE
.\}
R
rgallard 已提交
1816
Compile greetings\&.Hello:
1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac greetings/Hello\&.java\fR
 
.fi
.if n \{\
.RE
.\}
Run
\fBgreetings\&.Hello\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjava greetings\&.Hello World Universe Everyone\fR
\fBHello World\fR
\fBHello Universe\fR
\fBHello Everyone\fR
 
.fi
.if n \{\
.RE
.\}
.RE
R
rgallard 已提交
1845
.PP
1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877
\fBExample 2\fR
.br
Compile Multiple Source Files
.RS 4
This example compiles the
\fBAloha\&.java\fR,
\fBGutenTag\&.java\fR,
\fBHello\&.java\fR, and
\fBHi\&.java\fR
source files in the
\fBgreetings\fR
package\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fB% javac greetings/*\&.java\fR
\fB% ls greetings\fR
\fBAloha\&.class         GutenTag\&.class      Hello\&.class         Hi\&.class\fR
\fBAloha\&.java          GutenTag\&.java       Hello\&.java          Hi\&.java\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample 3\fR
.br
Specify a User Class Path
.RS 4
R
rgallard 已提交
1878
After changing one of the source files in the previous example, recompile it:
1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056
.sp
.if n \{\
.RS 4
.\}
.nf
\fBpwd\fR
\fB/examples\fR
\fBjavac greetings/Hi\&.java\fR
 
.fi
.if n \{\
.RE
.\}
Because
\fBgreetings\&.Hi\fR
refers to other classes in the
\fBgreetings\fR
package, the compiler needs to find these other classes\&. The previous example works because the default user class path is the directory that contains the package directory\&. If you want to recompile this file without concern for which directory you are in, then add the examples directory to the user class path by setting
\fBCLASSPATH\fR\&. This example uses the
\fB\-classpath\fR
option\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-classpath /examples /examples/greetings/Hi\&.java\fR
 
.fi
.if n \{\
.RE
.\}
If you change
\fBgreetings\&.Hi\fR
to use a banner utility, then that utility also needs to be accessible through the user class path\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-classpath /examples:/lib/Banners\&.jar \e\fR
\fB            /examples/greetings/Hi\&.java\fR
 
.fi
.if n \{\
.RE
.\}
To execute a class in the
\fBgreetings\fR
package, the program needs access to the
\fBgreetings\fR
package, and to the classes that the
\fBgreetings\fR
classes use\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjava \-classpath /examples:/lib/Banners\&.jar greetings\&.Hi\fR
 
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample 4\fR
.br
Separate Source Files and Class Files
.RS 4
The following example uses
\fBjavac\fR
to compile code that runs on JVM 1\&.7\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e \fR
\fB\-extdirs "" OldCode\&.java\fR
 
.fi
.if n \{\
.RE
.\}
The
\fB\-source 1\&.7\fR
option specifies that release 1\&.7 (or 7) of the Java programming language be used to compile
\fBOldCode\&.java\fR\&. The option
\fB\-target 1\&.7\fR
option ensures that the generated class files are compatible with JVM 1\&.7\&. Note that in most cases, the value of the
\fB\-target\fR
option is the value of the
\fB\-source\fR
option; in this example, you can omit the
\fB\-target\fR
option\&.
.sp
You must specify the
\fB\-bootclasspath\fR
option to specify the correct version of the bootstrap classes (the
\fBrt\&.jar\fR
library)\&. If not, then the compiler generates a warning:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-source 1\&.7 OldCode\&.java\fR
\fBwarning: [options] bootstrap class path not set in conjunction with \fR
\fB\-source 1\&.7\fR
 
.fi
.if n \{\
.RE
.\}
If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules (in this example, it uses version 1\&.7 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&.
.RE
.PP
\fBExample 5\fR
.br
Cross Compile
.RS 4
This example uses
\fBjavac\fR
to compile code that runs on JVM 1\&.7\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-source 1\&.7 \-target 1\&.7 \-bootclasspath jdk1\&.7\&.0/lib/rt\&.jar \e\fR
\fB            \-extdirs "" OldCode\&.java\fR
 
.fi
.if n \{\
.RE
.\}
The\fB \-source 1\&.7\fR
option specifies that release 1\&.7 (or 7) of the Java programming language to be used to compile OldCode\&.java\&. The
\fB\-target 1\&.7\fR
option ensures that the generated class files are compatible with JVM 1\&.7\&. In most cases, the value of the
\fB\-target\fR
is the value of
\fB\-source\fR\&. In this example, the
\fB\-target\fR
option is omitted\&.
.sp
You must specify the
\fB\-bootclasspath\fR
option to specify the correct version of the bootstrap classes (the
\fBrt\&.jar\fR
library)\&. If not, then the compiler generates a warning:
.sp
.if n \{\
.RS 4
.\}
.nf
\fBjavac \-source 1\&.7 OldCode\&.java\fR
\fBwarning: [options] bootstrap class path not set in conjunction with \-source 1\&.7\fR
 
.fi
.if n \{\
.RE
.\}
If you do not specify the correct version of bootstrap classes, then the compiler uses the old language rules combined with the new bootstrap classes\&. This combination can result in class files that do not work on the older platform (in this case, Java SE 7) because reference to nonexistent methods can get included\&. In this example, the compiler uses release 1\&.7 of the Java programming language\&.
.RE
.SH "SEE ALSO"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2057
java(1)
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2068
jdb(1)
2069 2070 2071 2072 2073 2074 2075 2076 2077 2078
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2079
javah(1)
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2090
javadoc(1)
2091 2092 2093 2094 2095 2096 2097 2098 2099 2100
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2101
jar(1)
2102 2103 2104 2105 2106 2107 2108 2109 2110 2111
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
R
rgallard 已提交
2112
jdb(1)
2113 2114 2115 2116
.RE
.br
'pl 8.5i
'bp