< prev index next >
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Main.java
Print this page
@@ -117,10 +117,22 @@
public Main(String name, PrintWriter out) {
this.ownName = name;
this.stdOut = this.stdErr = out;
}
+ /**
+ * Construct a compiler instance.
+ * @param name the name of this tool
+ * @param out a stream to which to write expected output
+ * @param err a stream to which to write diagnostic output
+ */
+ public Main(String name, PrintWriter out, PrintWriter err) {
+ this.ownName = name;
+ this.stdOut = out;
+ this.stdErr = err;
+ }
+
/** Report a usage error.
*/
void error(String key, Object... args) {
if (apiMode) {
String msg = log.localize(PrefixKind.JAVAC, key, args);
< prev index next >