// Wrap as a PrintWriter since that's what compile() wants
PrintWriter writer = new PrintWriter(internalWriter);
// result = com.sun.tools.javac.Main.compile(command, writer);
CompilationProgress progress = null;
PrintWriter outWriter = new PrintWriter(System.out);
success = BatchCompiler.compile(command, outWriter, writer,
progress);
// Close out the stream for good measure
writer.flush();