8008274: javac should not reference/use sample code
authorvromero
Wed, 07 Aug 2013 11:04:07 +0100
changeset 19252 83c32c7f747b
parent 19251 c3b7abd43bc0
child 19253 b97b3e18547f
8008274: javac should not reference/use sample code Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/javac/Main.java
--- a/langtools/src/share/classes/com/sun/tools/javac/Main.java	Wed Aug 07 10:41:20 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/Main.java	Wed Aug 07 11:04:07 2013 +0100
@@ -26,8 +26,6 @@
 package com.sun.tools.javac;
 
 import java.io.PrintWriter;
-import java.lang.reflect.*;
-
 
 /**
  * The programmatic interface for the Java Programming Language
@@ -44,23 +42,12 @@
 @jdk.Supported
 public class Main {
 
-    /** Unsupported command line interface.
-     * @param args   The command line parameters.
+    /** Main entry point for the launcher.
+     *  Note: This method calls System.exit.
+     *  @param args command line arguments
      */
     public static void main(String[] args) throws Exception {
-      if (args.length > 0 && args[0].equals("-Xjdb")) {
-        String[] newargs = new String[args.length + 2];
-        Class<?> c = Class.forName("com.sun.tools.example.debug.tty.TTY");
-        Method method = c.getDeclaredMethod ("main", new Class<?>[] {args.getClass()});
-        method.setAccessible(true);
-        System.arraycopy(args, 1, newargs, 3, args.length - 1);
-        newargs[0] = "-connect";
-        newargs[1] = "com.sun.jdi.CommandLineLaunch:options=-esa -ea:com.sun.tools...";
-        newargs[2] = "com.sun.tools.javac.Main";
-        method.invoke(null, new Object[] { newargs });
-      } else {
         System.exit(compile(args));
-      }
     }
 
     /** Programmatic interface to the Java Programming Language