< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java

Print this page




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.tools.javac;
  27 
  28 import java.io.PrintWriter;
  29 
  30 /**
  31  * A legacy programmatic interface for the Java Programming Language
  32  * compiler, javac.
  33  * See the <a href="{@docRoot}/jdk.compiler/module-summary.html">{@code jdk.compiler}</a>
  34  * module for details on replacement APIs.
  35  */
  36 public class Main {





  37 
  38     /** Main entry point for the launcher.
  39      *  Note: This method calls System.exit.
  40      *  @param args command line arguments
  41      *  @throws Exception only if an uncaught internal exception occurs;
  42      *      just retained for historical compatibility
  43      */
  44     public static void main(String[] args) throws Exception {
  45         System.exit(compile(args));
  46     }
  47 
  48     /** Programmatic interface to the Java Programming Language
  49      * compiler, javac.
  50      *
  51      * @param args The command line arguments that would normally be
  52      * passed to the javac program as described in the man page.
  53      * @return an integer equivalent to the exit value from invoking
  54      * javac, see the man page for details.
  55      */
  56     public static int compile(String[] args) {




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.tools.javac;
  27 
  28 import java.io.PrintWriter;
  29 
  30 /**
  31  * A legacy programmatic interface for the Java Programming Language
  32  * compiler, javac.
  33  * See the <a href="{@docRoot}/jdk.compiler/module-summary.html">{@code jdk.compiler}</a>
  34  * module for details on replacement APIs.
  35  */
  36 public class Main {
  37     /**
  38      * Do not call.
  39      */
  40     @Deprecated(since="16", forRemoval=true)
  41     public Main(){}
  42 
  43     /** Main entry point for the launcher.
  44      *  Note: This method calls System.exit.
  45      *  @param args command line arguments
  46      *  @throws Exception only if an uncaught internal exception occurs;
  47      *      just retained for historical compatibility
  48      */
  49     public static void main(String[] args) throws Exception {
  50         System.exit(compile(args));
  51     }
  52 
  53     /** Programmatic interface to the Java Programming Language
  54      * compiler, javac.
  55      *
  56      * @param args The command line arguments that would normally be
  57      * passed to the javac program as described in the man page.
  58      * @return an integer equivalent to the exit value from invoking
  59      * javac, see the man page for details.
  60      */
  61     public static int compile(String[] args) {


< prev index next >