The Java Programming Language Compiler, javac

The Java programming language compiler, javac, reads
source files written in the Java programming language, and compiles
them into bytecode class files. Optionally, the compiler can also
process annotations found in source and class files using the
Pluggable Annotation Processing API. The compiler is a command line
tool but can also be invoked using the Java Compiler API. The
compiler accepts source code defined by the Java Language
Specification (JLS) and produces class files defined by the Java
Virtual Machine Specification (JVMS).

Enhancements in Java SE 8

The javac tool now provides the ability to generate
native headers as needed. This removes the need to run the
javah tool as a separate step in the build pipeline. The
feature is enabled in javac by using the new -h
option, which is used to specify a directory in which the header
files should be written. Header files will be generated for any
class which has either native methods, or constant fields annotated
with a new annotation of type
java.lang.annotation.Native.

The javac tool now has support for checking the
content of javadoc comments for issues which could lead to
various problems, such as invalid HTML or accessibility issues, in
the files that are generated when javadoc is run. The
feature is enabled by the new -Xdoclint option. For more
details, see the output from running "javac -X". This
feature is also available in javadoc, and enabled there by
default.

Enhancements in Java SE 7 Update 2

Area: CompilerSynopsis: The Java 7 compiler used to erroneously
accept the diamond operator in array initializer expressions. For
example, the following code, which was previously accepted, is now
rightly rejected: