提交 78889dd1 编写于 作者: V vromero

8008274: javac should not reference/use sample code

Reviewed-by: jjg
上级 d52fa73a
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
package com.sun.tools.javac; package com.sun.tools.javac;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.lang.reflect.*;
/** /**
* The programmatic interface for the Java Programming Language * The programmatic interface for the Java Programming Language
...@@ -44,23 +42,12 @@ import java.lang.reflect.*; ...@@ -44,23 +42,12 @@ import java.lang.reflect.*;
@jdk.Supported @jdk.Supported
public class Main { public class Main {
/** Unsupported command line interface. /** Main entry point for the launcher.
* @param args The command line parameters. * Note: This method calls System.exit.
* @param args command line arguments
*/ */
public static void main(String[] args) throws Exception { 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)); System.exit(compile(args));
}
} }
/** Programmatic interface to the Java Programming Language /** Programmatic interface to the Java Programming Language
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册