blob: b434883b295a70357018dcf8c3765e65385f7b68 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Copyright 2006 Sun Microsystems, Inc. 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. Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the LICENSE file that accompanied this code.
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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
CA 95054 USA or visit www.sun.com if you need additional information or
have any questions.
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="author" content="Jonathan Gibbons">
<link type="text/css" rel="stylesheet" href="style.css">
<title>Main</title>
</head>
<body>
<h3>com.sun.tools.javac.main.Main</h3>
<p>
The normal main entry point is
<a href="../../src/share/classes/com/sun/tools/javac/main/Main.java" class=code>com.sun.tools.javac.main.Main</a>,
with a public API entry point at
<a href="../../src/share/classes/com/sun/tools/javac/Main.java" class=code>com.sun.tools.javac.Main</a> which just calls down to <code>com.sun.tools.javac.main.Main</code>.
</p>
<p>The various parts of the compiler share common information by means of a
<a href="../../src/share/classes/com/sun/tools/javac/util/Context.java" class=code>Context</a>.
Every invocation of the compiler must have its own Context.
<p>
<code>com.sun.tools.javac.main.Main</code> does command line processing to determine the list of files to be compiled, and any applicable options. There are four types of options:
<ul>
<li>standard public options, e.g. <code>-classpath</code>
<li>extended public options, beginning -X, e.g. <code>-Xlint</code>
<li>hidden options -- not public or documented, e.g. -fullversion
<li>even more hidden options -- typically for debugging the compiler, beginning -XD, e.g. -XDrawDiagnostics
</ul>
If there are files to be compiled, <code>Main</code> invokes
<a href="../../src/share/classes/com/sun/tools/javac/main/JavaCompiler.java" class=code>JavaCompiler</a> <i>(<a href="JavaCompiler.html">more...</a>)</i>
After <code>JavaCompiler</code> completes, the list of class symbols that was returned is discarded.
</p>
<p>
Any and all exceptions are caught and handled, and a return code is
determined. Finally, the compiler exits.
<p>
</body>
</html>