IT. Expert System.

Java Standard Edition (SE)


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).

API Specification

This lists the APIs introduced in the javac tool:

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: Compiler
Synopsis: 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:

class Foo<X> {}

class Test {
    Foo<String>[] fooArr = new Foo<>[]{ }; //error

See 7057297.

Area: Compiler
Synopsis: The Java 7 compiler erroneously accepted the following program due to a bug in the most specific algorithm implementation:

import java.util.*;

interface A {List<Number> getList();}
interface B {ArrayList getList();}
interface AB extends A, B {}

class Test {
   void test(AB ab) {
      Number n = ab.getList().get(1);

This program used to fail in JDK 6. A fix has been provided in Java SE 7u2 to rightly reject this program. See 7062745.

More Information

For more information on javac tool, visit the following links:


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 295 / 158692648. Delta: 0.10596 с