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