File[] files= javaDir.listFiles();
JavaCompiler compiler= ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
Iterable<? extends JavaFileObject> compilationUnits= fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
CompilationTask task = compiler.getTask(null, null, diagnostics, null, null, compilationUnits);
success = task.call();
if (!success) {
for (Diagnostic<? extends JavaFileObject> diag : diagnostics.getDiagnostics()) {
Output.conerr.println(diag.toString());
}
return success;