com.sun.tools.javac.main.Main

The normal main entry point is com.sun.tools.javac.main.Main, with a public API entry point at com.sun.tools.javac.Main which just calls down to com.sun.tools.javac.main.Main.

The various parts of the compiler share common information by means of a Context. Every invocation of the compiler must have its own Context.

com.sun.tools.javac.main.Main does command line processing to determine the list of files to be compiled, and any applicable options. There are four types of options:

If there are files to be compiled, Main invokes JavaCompiler (more...) After JavaCompiler completes, the list of class symbols that was returned is discarded.

Any and all exceptions are caught and handled, and a return code is determined. Finally, the compiler exits.