8055039: Sjavac does not print compilation errors to the console
Summary: Sjavac (client) now prints the result of the compilation on stdout/stderr.
Reviewed-by: jfranck
--- a/langtools/src/share/classes/com/sun/tools/sjavac/CompileJavaPackages.java Thu Aug 14 13:05:49 2014 +0200
+++ b/langtools/src/share/classes/com/sun/tools/sjavac/CompileJavaPackages.java Thu Aug 14 14:17:17 2014 +0200
@@ -246,6 +246,8 @@
requests[ii].run();
// If there was an error, then stop early when running single threaded.
if (rn[i].returnCode != 0) {
+ Log.info(rn[i].stdout);
+ Log.error(rn[i].stderr);
return false;
}
}
@@ -262,6 +264,8 @@
for (int i=0; i<numCompiles; ++i) {
if (compileChunks[i].srcs.size() > 0) {
if (rn[i].returnCode != 0) {
+ Log.info(rn[i].stdout);
+ Log.error(rn[i].stderr);
rc = false;
}
}