I found this code online about the JavaCompiler
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
int result = compiler.run(null, null, null,
"src/org/kodejava/example/tools/Hello.java");
And it says for the compiler.run(null, null, null that these three nulls are the default System.in, System.out and System.err respectively. But what do these values actually do as I cannot find the API for these? Could someone please explain?
The Javadoc is here.
As for System.in, System.out, and System.err those are global streams that (by default) connect to STDIN, STDERR, and STDOUT. These three are set up by the operating system when the JVM starts. You can pipe them to files, or they just write to (read from) the console.
In this case, you would use the parameters to inspect the compiler output from your program (rather than just sending it out to the user). This is where the “diagnostics written out in some unspecified format” come in.