jdk/src/solaris/doc/sun/man/man1/javac.1
changeset 9573 c02ff5a7c67b
parent 5865 47da38a8c0f0
child 21743 3d979da7bdf0
--- a/jdk/src/solaris/doc/sun/man/man1/javac.1	Tue May 10 19:57:30 2011 -0700
+++ b/jdk/src/solaris/doc/sun/man/man1/javac.1	Wed May 11 08:30:46 2011 -0700
@@ -1,4 +1,4 @@
-." Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+." Copyright (c) 1994, 2011, 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
@@ -19,7 +19,7 @@
 ." or visit www.oracle.com if you need additional information or have any
 ." questions.
 ."
-.TH javac 1 "02 Jun 2010"
+.TH javac 1 "10 May 2011"
 
 .LP
 .SH "Name"
@@ -27,14 +27,12 @@
 .LP
 .SH "SYNOPSIS"
 .LP
-
-.LP
 .nf
 \f3
 .fl
         \fP\f3javac\fP [ options ] [ sourcefiles ] [ classes ] [ @argfiles ]
 .fl
-      
+
 .fl
 .fi
 
@@ -43,9 +41,6 @@
 Arguments may be in any order.
 .LP
 .RS 3
-
-.LP
-.RS 3
 .TP 3
 options 
 Command\-line options. 
@@ -61,11 +56,8 @@
 .RE
 
 .LP
-.RE
 .SH "DESCRIPTION"
 .LP
-
-.LP
 .LP
 The \f3javac\fP tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. It can also process annotations in Java source files and classes.
 .LP
@@ -96,8 +88,6 @@
 .LP
 .SH "OPTIONS"
 .LP
-
-.LP
 .LP
 The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non\-standard options are specific to the current virtual machine and compiler implementations and are subject to change in the future. Non\-standard options begin with \f3\-X\fP.
 .LP
@@ -105,28 +95,18 @@
 Standard Options
 .LP
 .RS 3
-
-.LP
-.RS 3
 .TP 3
 \-Akey[=value] 
 Options to pass to annotation processors. These are not interpreted by javac directly, but are made available for use by individual processors. \f2key\fP should be one or more identifiers separated by ".". 
 .TP 3
 \-cp path or \-classpath path 
-Specify where to find user class files, and (optionally) annotation processors and source files. This classpath overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See 
-.na
-\f2Setting the Class Path\fP @
-.fi
-http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath for more details. 
-.LP
-If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files. 
-.LP
-If the \f3\-processorpath\fP option is not specified, the classpath is also searched for annotation processors.  
-.LP
-As a special convenience, a class path element containing a basename of \f2*\fP is considered equivalent to specifying a list of all the files in the directory with the extension \f2.jar\fP or \f2.JAR\fP.
+Specify where to find user class files, and (optionally) annotation processors and source files. This class path overrides the user class path in the \f3CLASSPATH\fP environment variable. If neither \f3CLASSPATH\fP, \f3\-cp\fP nor \f3\-classpath\fP is specified, the user class path consists of the current directory. See Setting the Class Path for more details.
 .br
 .br
-For example, if directory \f2foo\fP contains \f2a.jar\fP and \f2b.JAR\fP, then the class path element \f2foo/*\fP is expanded to \f2A.jar:b.JAR\fP, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of \f2*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. \f3Note:\fP \  Depending of the configuration of your command line environment, you may have to quote the wild card character, for example, \f2javac \-cp "*.jar" MyClass.java\fP.  
+>If the \f3\-sourcepath\fP option is not specified, the user class path is also searched for source files.
+.br
+.br
+If the \f3\-processorpath\fP option is not specified, the class path is also searched for annotation processors. 
 .TP 3
 \-Djava.ext.dirs=directories 
 Override the location of installed extensions. 
@@ -135,17 +115,28 @@
 Override the location of endorsed standards path. 
 .TP 3
 \-d directory 
-Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP. 
-.LP
-If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated. 
-.LP
-\f3Note:\fP \  The directory specified by \f3\-d\fP is not automatically added to your user class path.  
+Set the destination directory for class files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, \f3javac\fP puts the class file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-d /home/myclasses\fP and the class is called \f2com.mypackage.MyClass\fP, then the class file is called \f2/home/myclasses/com/mypackage/MyClass.class\fP.
+.br
+.br
+If \f3\-d\fP is not specified, \f3javac\fP puts each class files in the same directory as the source file from which it was generated.
+.br
+.br
+\f3Note:\fP The directory specified by \f3\-d\fP is not automatically added to your user class path. 
 .TP 3
 \-deprecation 
 Show a description of each use or override of a deprecated member or class. Without \f3\-deprecation\fP, \f3javac\fP shows a summary of the source files that use or override deprecated members or classes. \f3\-deprecation\fP is shorthand for \f3\-Xlint:deprecation\fP. 
 .TP 3
 \-encoding encoding 
-Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used. 
+Set the source file encoding name, such as \f2EUC\-JP and UTF\-8\fP. If \f3\-encoding\fP is not specified, the platform default converter is used.  
+.TP 3
+\-endorseddirs directories 
+Override the location of endorsed standards path. 
+.TP 3
+\-extdirs directories 
+Overrides the location of the \f2ext\fP directory. The \f2directories\fP variable is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. All JAR archives found are automatically part of the class path.
+.br
+.br
+If you are cross\-compiling (compiling classes against bootstrap and extension classes of a different Java platform implementation), this option specifies the directories that contain the extension classes. See Cross\-Compilation Options for more information. 
 .TP 3
 \-g 
 Generate all debugging information, including local variables. By default, only line number and source file information is generated. 
@@ -171,7 +162,13 @@
 Print a synopsis of standard options. 
 .TP 3
 \-implicit:{class,none} 
-Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types. 
+Controls the generation of class files for implicitly loaded source files. To automatically generate class files, use \f3\-implicit:class\fP. To suppress class file generation, use \f3\-implicit:none\fP. If this option is not specified, the default is to automatically generate class files. In this case, the compiler will issue a warning if any such class files are generated when also doing annotation processing. The warning will not be issued if this option is set explicitly. See Searching For Types.  
+.TP 3
+\-Joption 
+Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java.
+.br
+.br
+\f3Note:\fP \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher. 
 .TP 3
 \-nowarn 
 Disable warning messages. This has the same meaning as \f3\-Xlint:none\fP. 
@@ -183,7 +180,7 @@
 Names of the annotation processors to run. This bypasses the default discovery process. 
 .TP 3
 \-processorpath path 
-Specify where to find annotation processors; if this option is not used, the classpath will be searched for processors. 
+Specify where to find annotation processors; if this option is not used, the class path will be searched for processors. 
 .TP 3
 \-s dir 
 Specify the directory where to place generated source files. The directory must already exist; \f3javac\fP will not create it. If a class is part of a package, the compiler puts the source file in a subdirectory reflecting the package name, creating directories as needed. For example, if you specify \f3\-s /home/mysrc\fP and the class is called \f2com.mypackage.MyClass\fP, then the source file will be placed in \f2/home/mysrc/com/mypackage/MyClass.java\fP. 
@@ -218,41 +215,42 @@
 .RE
 .TP 3
 \-sourcepath sourcepath 
-Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. 
-.LP
-\f3Note:\fP \  Classes found through the classpath may be subject to automatic recompilation if their sources are also found. See Searching For Types.  
+Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name.
+.br
+.br
+\f3Note:\fP Classes found through the class path may be subject to automatic recompilation if their sources are also found. See Searching For Types. 
 .TP 3
 \-verbose 
 Verbose output. This includes information about each class loaded and each source file compiled. 
 .TP 3
 \-version 
-Print version information. 
+Print version information.  
+.TP 3
+\-Werror 
+Terminate compilation if warnings occur. 
 .TP 3
 \-X 
 Display information about non\-standard options and exit. 
 .RE
 
 .LP
-.RE
 .SS 
 Cross\-Compilation Options
 .LP
-.RS 3
-
-.LP
 .LP
 By default, classes are compiled against the bootstrap and extension classes of the platform that \f3javac\fP shipped with. But \f3javac\fP also supports \f2cross\-compiling\fP, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use \f3\-bootclasspath\fP and \f3\-extdirs\fP when cross\-compiling; see Cross\-Compilation Example below.
 .LP
 .RS 3
 .TP 3
 \-target version 
-Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP). 
-.LP
+Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are \f31.1\fP \f31.2\fP \f31.3\fP \f31.4\fP \f31.5\fP (also \f35\fP) \f31.6\fP (also \f36\fP) and \f31.7\fP (also \f37\fP).
+.br
+.br
 The default for \f3\-target\fP depends on the value of \f3\-source\fP: 
 .RS 3
 .TP 2
 o
-If \-source is \f3not specified\fP, the value of \-target is \f31.6\fP 
+If \-source is \f3not specified\fP, the value of \-target is \f31.7\fP 
 .TP 2
 o
 If \-source is \f31.2\fP, the value of \-target is \f31.4\fP 
@@ -261,25 +259,18 @@
 If \-source is \f31.3\fP, the value of \-target is \f31.4\fP 
 .TP 2
 o
-For \f3all other values\fP of \-source, the value of \-target is the value of \f3\-source\fP. 
+For \f3all other values\fP of \-source, the value of \f3\-target\fP is the value of \f3\-source\fP. 
 .RE
 .TP 3
 \-bootclasspath bootclasspath 
 Cross\-compile against the specified set of boot classes. As with the user class path, boot class path entries are separated by colons (\f3:\fP) and can be directories, JAR archives, or ZIP archives. 
-.TP 3
-\-extdirs directories 
-Cross\-compile against the specified extension directories. \f2Directories\fP is a colon\-separated list of directories. Each JAR archive in the specified directories is searched for class files. 
 .RE
 
 .LP
-.RE
 .SS 
 Non\-Standard Options
 .LP
 .RS 3
-
-.LP
-.RS 3
 .TP 3
 \-Xbootclasspath/p:path 
 Prepend to the bootstrap class path. 
@@ -291,54 +282,19 @@
 Override location of bootstrap class files. 
 .TP 3
 \-Xlint 
-Enable all recommended warnings. In this release, all available warnings are recommended. 
+Enable all recommended warnings. In this release, enabling all available warnings is recommended. 
+.TP 3
+\-Xlint:all 
+Enable all recommended warnings. In this release, enabling all available warnings is recommended. 
 .TP 3
 \-Xlint:none 
-Disable all warnings not mandated by the Java Language Specification. 
+Disable all warnings. 
+.TP 3
+\-Xlint:name 
+Enable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can enable with this option. 
 .TP 3
 \-Xlint:\-name 
-Disable warning \f2name\fP, where \f2name\fP is one of the warning names supported for \f3\-Xlint:\fP\f2name\fP, below. 
-.TP 3
-\-Xlint:unchecked 
-Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. 
-.TP 3
-\-Xlint:path 
-Warn about nonexistent path (classpath, sourcepath, etc) directories. 
-.TP 3
-\-Xlint:serial 
-Warn about missing \f2serialVersionUID\fP definitions on serializable classes. 
-.TP 3
-\-Xlint:finally 
-Warn about \f2finally\fP clauses that cannot complete normally. 
-.TP 3
-\-Xlint:fallthrough 
-Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: 
-.RS 3
-
-.LP
-.nf
-\f3
-.fl
-switch (x) {
-.fl
-case 1:
-.fl
-       System.out.println("1");
-.fl
-       //  No  break;  statement here.
-.fl
-case 2:
-.fl
-       System.out.println("2");
-.fl
-}
-.fl
-            
-.fl
-\fP
-.fi
-.RE
-If the \f2\-Xlint:fallthrough\fP flag were used when compiling this code, the compiler would emit a warning about "possible fall\-through into case," along with the line number of the case in question. 
+Disable warning \f2name\fP. See the section Warnings That Can Be Enabled or Disabled with \-Xlint Option for a list of warnings you can disable with this option. 
 .TP 3
 \-Xmaxerrs number 
 Set the maximum number of errors to print. 
@@ -350,7 +306,10 @@
 Send compiler messages to the named file. By default, compiler messages go to \f2System.err\fP. 
 .TP 3
 \-Xprefer:{newer,source} 
-Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP. 
+Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If \f2\-Xprefer:newer\fP is used, it reads the newer of the source or class file for a type (default). If the \f2\-Xprefer:source\fP option is used, it reads source file. Use \f2\-Xprefer:source\fP when you want to be sure that any annotation processors can access annotations declared with a retention policy of \f2SOURCE\fP.  
+.TP 3
+\-Xpkginfo:{always,legacy,nonempty} 
+Specify handling of package\-info files 
 .TP 3
 \-Xprint 
 Print out textual representation of specified types for debugging purposes; perform neither annotation processing nor compilation. The format of the output may change. 
@@ -363,27 +322,420 @@
 .RE
 
 .LP
-.RE
 .SS 
-The \-J Option
+Warnings That Can Be Enabled or Disabled with \-Xlint Option
 .LP
-.RS 3
-
+.LP
+Enable warning \f2name\fP with the option \f3\-Xlint:\fP\f2name\fP, where \f2name\fP is one of the following warning names. Similarly, you can disable warning \f2name\fP with the option \f3\-Xlint:\-\fP\f2name\fP:
 .LP
 .RS 3
 .TP 3
-\-Joption 
-Pass \f2option\fP to the \f3java\fP launcher called by \f3javac\fP. For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f3\-X\fP, it is not a `standard option' of \f3javac\fP. It is a common convention for \f3\-J\fP to pass options to the underlying VM executing applications written in Java. 
-.LP
-\f3Note:\fP \  \f3CLASSPATH\fP, \f3\-classpath\fP, \f3\-bootclasspath\fP, and \f3\-extdirs\fP do \f2not\fP specify the classes used to run \f3javac\fP. Fiddling with the implementation of the compiler in this way is usually pointless and always risky. If you do need to do this, use the \f3\-J\fP option to pass through options to the underlying \f3java\fP launcher.  
+cast 
+Warn about unnecessary and redundant casts. For example: 
+.nf
+\f3
+.fl
+String s = (String)"Hello!"
+.fl
+\fP
+.fi
+.TP 3
+classfile 
+Warn about issues related to classfile contents. 
+.TP 3
+deprecation 
+Warn about use of deprecated items. For example: 
+.nf
+\f3
+.fl
+    java.util.Date myDate = new java.util.Date();
+.fl
+    int currentDay = myDate.getDay();
+.fl
+\fP
+.fi
+The method \f2java.util.Date.getDay\fP has been deprecated since JDK 1.1. 
+.TP 3
+dep\-ann 
+Warn about items that are documented with an \f2@deprecated\fP Javadoc comment, but do not have a \f2@Deprecated\fP annotation. For example: 
+.nf
+\f3
+.fl
+  /**
+.fl
+   * @deprecated As of Java SE 7, replaced by {@link #newMethod()}
+.fl
+   */
+.fl
+
+.fl
+  public static void deprecatedMethood() { }
+.fl
+
+.fl
+  public static void newMethod() { }
+.fl
+\fP
+.fi
+.TP 3
+divzero 
+Warn about division by constant integer 0. For example: 
+.nf
+\f3
+.fl
+    int divideByZero = 42 / 0;
+.fl
+\fP
+.fi
+.TP 3
+empty 
+Warn about empty statements after \f2if\fP statements. For example: 
+.nf
+\f3
+.fl
+class E {
+.fl
+    void m() {
+.fl
+        if (true) ;
+.fl
+    }
+.fl
+}
+.fl
+\fP
+.fi
+.TP 3
+fallthrough 
+Check \f2switch\fP blocks for fall\-through cases and provide a warning message for any that are found. Fall\-through cases are cases in a \f2switch\fP block, other than the last case in the block, whose code does not include a \f2break\fP statement, allowing code execution to "fall through" from that case to the next case. For example, the code following the \f2case 1\fP label in this \f2switch\fP block does not end with a \f2break\fP statement: 
+.nf
+\f3
+.fl
+switch (x) {
+.fl
+case 1:
+.fl
+       System.out.println("1");
+.fl
+       //  No break statement here.
+.fl
+case 2:
+.fl
+       System.out.println("2");
+.fl
+}
+.fl
+\fP
+.fi
+If the \f2\-Xlint:fallthrough\fP flag were used when compiling this code, the compiler would emit a warning about "possible fall\-through into case," along with the line number of the case in question. 
+.TP 3
+finally 
+Warn about \f2finally\fP clauses that cannot complete normally. For example: 
+.nf
+\f3
+.fl
+  public static int m() {
+.fl
+    try {
+.fl
+      throw new NullPointerException();
+.fl
+    } catch (NullPointerException e) {
+.fl
+      System.err.println("Caught NullPointerException.");
+.fl
+      return 1;
+.fl
+    } finally {
+.fl
+      return 0;
+.fl
+    }
+.fl
+  }
+.fl
+\fP
+.fi
+The compiler generates a warning for \f2finally\fP block in this example. When this method is called, it returns a value of \f20\fP, not \f21\fP. A \f2finally\fP block always executes when the \f2try\fP block exits. In this example, if control is transferred to the \f2catch\fP, then the method exits. However, the \f2finally\fP block must be executed, so it is executed, even though control has already been transferred outside the method. 
+.TP 3
+options 
+Warn about issues relating to the use of command line options. See Cross\-Compilation Example for an example of this kind of warning. 
+.TP 3
+overrides 
+Warn about issues regarding method overrides. For example, consider the following two classes: 
+.nf
+\f3
+.fl
+public class ClassWithVarargsMethod {
+.fl
+  void varargsMethod(String... s) { }
+.fl
+}
+.fl
+\fP
+.fi
+.nf
+\f3
+.fl
+public class ClassWithOverridingMethod extends ClassWithVarargsMethod {
+.fl
+  @Override
+.fl
+  void varargsMethod(String[] s) { }
+.fl
+}
+.fl
+\fP
+.fi
+The compiler generates a warning similar to the following:
+.br
+.br
+\f2warning: [override] varargsMethod(String[]) in ClassWithOverridingMethod overrides varargsMethod(String...) in ClassWithVarargsMethod; overriding method is missing '...'\fP
+.br
+.br
+When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. In the method \f2ClassWithVarargsMethod.varargsMethod\fP, the compiler translates the varargs formal parameter \f2String... s\fP to the formal parameter \f2String[] s\fP, an array, which matches the formal parameter of the method \f2ClassWithOverridingMethod.varargsMethod\fP. Consequently, this example compiles. 
+.TP 3
+path 
+Warn about invalid path elements and nonexistent path directories on the command line (with regards to the class path, the source path, and other paths). Such warnings cannot be suppressed with the \f2@SuppressWarnings\fP annotation. For example: 
+.nf
+\f3
+.fl
+javac \-Xlint:path \-classpath /nonexistentpath Example.java
+.fl
+\fP
+.fi
+.TP 3
+processing 
+Warn about issues regarding annotation processing. The compiler generates this warning if 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:
+.br
+.br
+\f3Source file \fP\f4AnnoProc.java\fP: 
+.nf
+\f3
+.fl
+import java.util.*;
+.fl
+import javax.annotation.processing.*;
+.fl
+import javax.lang.model.*;
+.fl
+import javax.lang.model.element.*;
+.fl
+
+.fl
+@SupportedAnnotationTypes("NotAnno")
+.fl
+public class AnnoProc extends AbstractProcessor {
+.fl
+    public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv) {
+.fl
+        return true;
+.fl
+    }
+.fl
+
+.fl
+    public SourceVersion getSupportedSourceVersion() {
+.fl
+        return SourceVersion.latest();
+.fl
+    }
+.fl
+}
+.fl
+\fP
+.fi
+\f3Source file \fP\f4AnnosWithoutProcessors.java\fP\f3:\fP 
+.nf
+\f3
+.fl
+@interface Anno { }
+.fl
+
+.fl
+@Anno
+.fl
+class AnnosWithoutProcessors { }
+.fl
+\fP
+.fi
+The following commands compile the annotation processor \f2AnnoProc\fP, then run this annotation processor against the source file \f2AnnosWithoutProcessors.java\fP: 
+.nf
+\f3
+.fl
+% javac AnnoProc.java
+.fl
+% javac \-cp . \-Xlint:processing \-processor AnnoProc \-proc:only AnnosWithoutProcessors.java
+.fl
+\fP
+.fi
+When the compiler runs the annotation processor against the source file \f2AnnosWithoutProcessors.java\fP, it generates the following warning:
+.br
+.br
+\f2warning: [processing] No processor claimed any of these annotations: Anno\fP
+.br
+.br
+To resolve this issue, you can rename the annotation defined and used in the class \f2AnnosWithoutProcessors\fP from \f2Anno\fP to \f2NotAnno\fP. 
+.TP 3
+rawtypes 
+Warn about unchecked operations on raw types. The following statement generates a \f2rawtypes\fP warning: 
+.nf
+\f3
+.fl
+void countElements(List l) { ... }
+.fl
+\fP
+.fi
+The following does not generate a \f2rawtypes\fP warning: 
+.nf
+\f3
+.fl
+void countElements(List<?> l) { ... }
+.fl
+\fP
+.fi
+\f2List\fP is a raw type. However, \f2List<?>\fP is a unbounded wildcard parameterized type. Because \f2List\fP is a parameterized interface, you should always specify its type argument. In this example, the \f2List\fP formal argument is specified with a unbounded wildcard (\f2?\fP) as its formal type parameter, which means that the \f2countElements\fP method can accept any instantiation of the \f2List\fP interface. 
+.TP 3
+serial 
+Warn about missing \f2serialVersionUID\fP definitions on serializable classes. For example: 
+.nf
+\f3
+.fl
+public class PersistentTime implements Serializable
+.fl
+{
+.fl
+  private Date time;
+.fl
+
+.fl
+   public PersistentTime() {
+.fl
+     time = Calendar.getInstance().getTime();
+.fl
+   }
+.fl
+
+.fl
+   public Date getTime() {
+.fl
+     return time;
+.fl
+   }
+.fl
+}
+.fl
+\fP
+.fi
+The compiler generates the following warning:
+.br
+.br
+\f2warning: [serial] serializable class PersistentTime has no definition of serialVersionUID\fP
+.br
+.br
+If a serializable class does not explicitly declare a field named \f2serialVersionUID\fP, then the serialization runtime will calculate a default \f2serialVersionUID\fP 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 \f2serialVersionUID\fP values because the default process of computing \f2serialVersionUID\fP vales is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpected \f2InvalidClassExceptions\fP during deserialization. Therefore, to guarantee a consistent \f2serialVersionUID\fP value across different Java compiler implementations, a serializable class must declare an explicit \f2serialVersionUID\fP value. 
+.TP 3
+static 
+Warn about issues relating to use of statics. For example: 
+.nf
+\f3
+.fl
+class XLintStatic {
+.fl
+    static void m1() { }
+.fl
+    void m2() { this.m1(); }
+.fl
+}
+.fl
+\fP
+.fi
+The compiler generates the following warning: 
+.nf
+\f3
+.fl
+warning: [static] static method should be qualified by type name, XLintStatic, instead of by an expression
+.fl
+\fP
+.fi
+To resolve this issue, you can call the static method \f2m1\fP as follows: 
+.nf
+\f3
+.fl
+XLintStatic.m1();
+.fl
+\fP
+.fi
+Alternatively, you can remove the \f2static\fP keyword from the declaration of the method \f2m1\fP. 
+.TP 3
+try 
+Warn about issues relating to use of \f2try\fP blocks, including try\-with\-resources statements. For example, a warning is generated for the following statement because the resource \f2ac\fP declared in the \f2try\fP statement is not used: 
+.nf
+\f3
+.fl
+try ( AutoCloseable ac = getResource() ) {
+.fl
+    // do nothing
+.fl
+}
+.fl
+\fP
+.fi
+.TP 3
+unchecked 
+Give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. For example: 
+.nf
+\f3
+.fl
+    List l = new ArrayList<Number>();
+.fl
+    List<String> ls = l;       // unchecked warning
+.fl
+\fP
+.fi
+During type erasure, the types \f2ArrayList<Number>\fP and \f2List<String>\fP become \f2ArrayList\fP and \f2List\fP, respectively.
+.br
+.br
+The variable \f2ls\fP has the parameterized type \f2List<String>\fP. When the \f2List\fP referenced by \f2l\fP is assigned to \f2ls\fP, the compiler generates an unchecked warning; the compiler is unable to determine at compile time, and moreover knows that the JVM will not be able to determine at runtime, if \f2l\fP refers to a \f2List<String>\fP type; it does not. Consequently, heap pollution occurs.
+.br
+.br
+In detail, a heap pollution situation occurs when the \f2List\fP object \f2l\fP, whose static type is \f2List<Number>\fP, is assigned to another \f2List\fP object, \f2ls\fP, that has a different static type, \f2List<String>\fP. However, the compiler still allows this assignment. It must allow this assignment to preserve backwards compatibility with versions of Java SE that do not support generics. Because of type erasure, \f2List<Number>\fP and \f2List<String>\fP both become \f2List\fP. Consequently, the compiler allows the assignment of the object \f2l\fP, which has a raw type of \f2List\fP, to the object \f2ls\fP. 
+.TP 3
+varargs 
+Warn about unsafe usages of variable arguments (varargs) methods, in particular, those that contain non\-reifiable arguments. For example: 
+.nf
+\f3
+.fl
+public class ArrayBuilder {
+.fl
+  public static <T> void addToList (List<T> listArg, T... elements) {
+.fl
+    for (T x : elements) {
+.fl
+      listArg.add(x);
+.fl
+    }
+.fl
+  }
+.fl
+}
+.fl
+\fP
+.fi
+The compiler generates the following warning for the definition of the method \f2ArrayBuilder.addToList\fP: 
+.nf
+\f3
+.fl
+warning: [varargs] Possible heap pollution from parameterized vararg type T
+.fl
+\fP
+.fi
+When the compiler encounters a varargs method, it translates the varargs formal parameter into an array. However, the Java programming language does not permit the creation of arrays of parameterized types. In the method \f2ArrayBuilder.addToList\fP, the compiler translates the varargs formal parameter \f2T... elements\fP to the formal parameter \f2T[] elements\fP, an array. However, because of type erasure, the compiler converts the varargs formal parameter to \f2Object[] elements\fP. Consequently, there is a possibility of heap pollution. 
 .RE
 
 .LP
-.RE
 .SH "COMMAND LINE ARGUMENT FILES"
 .LP
-
-.LP
 .LP
 To shorten or simplify the javac command line, you can specify one or more files that themselves contain arguments to the \f2javac\fP command (except \f2\-J\fP options). This enables you to create javac commands of any length on any operating system.
 .LP
@@ -405,9 +757,7 @@
 .nf
 \f3
 .fl
-  % \fP\f3javac @argfile\fP
-.fl
-      
+% \fP\f3javac @argfile\fP
 .fl
 .fi
 
@@ -433,7 +783,7 @@
 .fl
      \-sourcepath /java/pubs/ws/1.3/src/share/classes
 .fl
-      
+
 .fl
 \fP
 .fi
@@ -451,7 +801,7 @@
 .fl
      MyClass3.java
 .fl
-      
+
 .fl
 \fP
 .fi
@@ -465,7 +815,7 @@
 .fl
   % \fP\f3javac @options @classes\fP
 .fl
-      
+
 .fl
 .fi
 
@@ -479,17 +829,13 @@
 .nf
 \f3
 .fl
-  % \fP\f3javac @path1/options @path2/classes\fP
-.fl
-      
+% \fP\f3javac @path1/options @path2/classes\fP
 .fl
 .fi
 
 .LP
 .SH "ANNOTATION PROCESSING"
 .LP
-
-.LP
 .LP
 \f3javac\fP provides direct support for annotation processing, superseding the need for the separate annotation processing tool, \f3apt\fP.
 .LP
@@ -500,11 +846,7 @@
 Overview of annotation processing
 .LP
 .LP
-Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named
-.br
-\f2\  META\-INF/services/javax.annotation.processing.Processor\fP
-.br
-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 \f3\-processor\fP option.
+Unless annotation processing is disabled with the \f3\-proc:none\fP option, the compiler searches for any annotation processors that are available. The search path can be specified with the \f3\-processorpath\fP option; if it is not given, the user class path is used. Processors are located by means of service provider\-configuration files named \f2META\-INF/services/javax.annotation.processing.Processor\fP 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 \f3\-processor\fP option.
 .LP
 .LP
 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 will be invoked. A processor may "claim" the annotations it processes, in which case no further attempt is made to find any processors for those annotations. Once all annotations have been claimed, the compiler does not look for additional processors.
@@ -523,8 +865,6 @@
 .LP
 .SH "SEARCHING FOR TYPES"
 .LP
-
-.LP
 .LP
 When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given 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 which provide information through inheritance.
 .LP
@@ -532,11 +872,7 @@
 For example, when you subclass \f3java.applet.Applet\fP, you are also using \f3Applet's\fP ancestor classes: \f3java.awt.Panel\fP, \f3java.awt.Container\fP, \f3java.awt.Component\fP, and \f3java.lang.Object\fP.
 .LP
 .LP
-When the compiler needs type information, it looks for a source file or class file which 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 \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see 
-.na
-\f2Setting the Class Path\fP @
-.fi
-http://java.sun.com/javase/6/docs/technotes/tools/index.html#classpath).
+When the compiler needs type information, it looks for a source file or class file which 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 \f3CLASSPATH\fP environment variable or by using the \f3\-classpath\fP command line option. (For details, see Setting the Class Path).
 .LP
 .LP
 If you set the \-sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files.
@@ -555,8 +891,6 @@
 .LP
 .SH "PROGRAMMATIC INTERFACE"
 .LP
-
-.LP
 .LP
 \f3javac\fP supports the new Java Compiler API defined by the classes and interfaces in the \f2javax.tools\fP package.
 .LP
@@ -573,8 +907,6 @@
 .fl
 int rc = javac.run(null, null, null, args);
 .fl
-      
-.fl
 \fP
 .fi
 
@@ -588,11 +920,8 @@
 .SS 
 Old Interface
 .LP
-.RS 3
-
 .LP
-.LP
-\f3Note:\fP \  This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above.
+\f3Note:\fP This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above.
 .LP
 .LP
 The \f2com.sun.tools.javac.Main\fP class provides two static methods to invoke the compiler from a program:
@@ -604,8 +933,6 @@
 .fl
 public static int compile(String[] args, PrintWriter out);
 .fl
-      
-.fl
 \fP
 .fi
 
@@ -622,21 +949,14 @@
 .LP
 Note that all \f3other\fP classes and methods found in a package whose name starts with \f2com.sun.tools.javac\fP (informally known as sub\-packages of \f2com.sun.tools.javac\fP) are strictly internal and subject to change at any time.
 .LP
-.RE
 .SH "EXAMPLES"
 .LP
 .SS 
 Compiling a Simple Program
 .LP
-.RS 3
-
-.LP
 .LP
 One source file, \f2Hello.java\fP, defines a class called \f3greetings.Hello\fP. The \f2greetings\fP directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with \f3\-d\fP.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -682,25 +1002,15 @@
 .fl
 Hello Everyone
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
-.RE
 .SS 
 Compiling Multiple Source Files
 .LP
-.RS 3
-
-.LP
 .LP
 This example compiles all the source files in the package \f2greetings\fP.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -720,27 +1030,15 @@
 .fl
 Aloha.java          GutenTag.java       Hello.java          Hi.java
 .fl
-
-.fl
-        
-.fl
 .fi
-.RE
 
 .LP
-.RE
 .SS 
 Specifying a User Class Path
 .LP
-.RS 3
-
-.LP
 .LP
 Having changed one of the source files in the previous example, we recompile it:
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -750,35 +1048,23 @@
 .fl
 % \f3javac greetings/Hi.java\fP
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
 .LP
 Since \f2greetings.Hi\fP refers to other classes in the \f2greetings\fP package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we're in? Then we need to add \f2/examples\fP to the user class path. We can do this by setting \f3CLASSPATH\fP, but here we'll use the \f3\-classpath\fP option.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
 % \fP\f3javac \-classpath /examples /examples/greetings/Hi.java\fP
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
 .LP
 If we change \f2greetings.Hi\fP again, to use a banner utility, that utility also needs to be accessible through the user class path.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -786,42 +1072,26 @@
 .fl
             /examples/greetings/Hi.java\fP
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
 .LP
 To execute a class in \f2greetings\fP, we need access both to \f2greetings\fP and to the classes it uses.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
 % \fP\f3java \-classpath /examples:/lib/Banners.jar greetings.Hi\fP
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
-.RE
 .SS 
 Separating Source Files and Class Files
 .LP
-.RS 3
-
-.LP
 .LP
 It often makes sense to keep source files and class files in separate directories, especially on large projects. We use \f3\-d\fP to indicate the separate class file destination. Since the source files are not in the user class path, we use \f3\-sourcepath\fP to help the compiler find them.
 .LP
-.RS 3
-
-.LP
 .nf
 \f3
 .fl
@@ -855,61 +1125,56 @@
 .fl
 Base.class      GoodBye.class
 .fl
-
-.fl
-        
-.fl
 .fi
-.RE
 
 .LP
 .LP
-\f3Note:\fP \  The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option.
+\f3Note:\fP The compiler compiled \f2src/farewells/Base.java\fP, even though we didn't specify it on the command line. To trace automatic compiles, use the \f3\-verbose\fP option.
 .LP
-.RE
 .SS 
 Cross\-Compilation Example
 .LP
-.RS 3
-
 .LP
-.LP
-Here we use \f3javac\fP to compile code that will run on a 1.7 VM.
-.LP
-.RS 3
-
+Here we use \f3javac\fP to compile code that will run on a 1.6 VM.
 .LP
 .nf
 \f3
 .fl
-% \fP\f3javac \-target 1.7 \-bootclasspath jdk1.7.0/lib/rt.jar \\ 
+% \fP\f3javac \-source 1.6 \-target 1.6 \-bootclasspath jdk1.6.0/lib/rt.jar \\ 
 .fl
             \-extdirs "" OldCode.java\fP
 .fl
-        
-.fl
 .fi
-.RE
 
 .LP
 .LP
-The \f3\-target 1.7\fP option ensures that the generated class files will be compatible with 1.7 VMs. By default, \f3javac\fP compiles for JDK 6.
+The \f2\-source 1.6\fP option specifies that version 1.6 (or 6) of the Java programming language be used to compile \f2OldCode.java\fP. The option \f3\-target 1.6\fP option ensures that the generated class files will be compatible with 1.6 VMs. Note that in most cases, the value of the \f3\-target\fP option is the value of the \f3\-source\fP option; in this example, you can omit the \f3\-target\fP option.
 .LP
 .LP
-The Java Platform JDK's \f3javac\fP would also by default compile against its own bootstrap classes, so we need to tell \f3javac\fP to compile against JDK 1.7 bootstrap classes instead. We do this with \f3\-bootclasspath\fP and \f3\-extdirs\fP. Failing to do this might allow compilation against a Java Platform API that would not be present on a 1.7 VM and would fail at runtime.
+You must specify the \f3\-bootclasspath\fP option to specify the correct version of the bootstrap classes (the \f2rt.jar\fP library). If not, the compiler generates a warning:
 .LP
-.RE
+.nf
+\f3
+.fl
+% \fP\f3javac \-source 1.6 OldCode.java\fP
+.fl
+warning: [options] bootstrap class path not set in conjunction with \-source 1.6
+.fl
+.fi
+
+.LP
+.LP
+If you do not specify the correct version of bootstrap classes, the compiler will use the old language rules (in this example, it will use version 1.6 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 6) because reference to non\-existent methods can get included.
+.LP
 .SH "SEE ALSO"
 .LP
-
-.LP
 .RS 3
 .TP 2
 o
 .na
 \f2The javac Guide\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html 
+http://download.oracle.com/javase/7/docs/technotes/guides/javac/index.html 
 .TP 2
 o
 java(1) \- the Java Application Launcher 
@@ -933,7 +1198,7 @@
 .na
 \f2The Java Extensions Framework\fP @
 .fi
-http://java.sun.com/javase/6/docs/technotes/guides/extensions/index.html 
+http://download.oracle.com/javase/7/docs/technotes/guides/extensions/index.html 
 .RE
 
 .LP