lib 1400533 // ECJ import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaFileObject; import org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl; static L> invokeEcj_direct_withDiagnostics(File optionsFile) ctex { new StringWriter writer; PrintWriter printWriter = new(writer); S[] args = { "@" + optionsFile.getPath() }; EclipseCompilerImpl compiler = new EclipseCompilerImpl(printWriter, printWriter, false); DiagnosticCollector diagnosticCollector = new DiagnosticCollector<>(); compiler.diagnosticListener = diagnosticCollector; compiler.compile(args); L> diagnostics = diagnosticCollector.getDiagnostics(); ret diagnostics; }