options.add(outDir.getPath());
// sources
List<File> srcFiles = expandDirs(sources, "java");
List<EclipseFileObject> compilationUnits = new ArrayList<EclipseFileObject>(srcFiles.size());
for(File fi : srcFiles) {
compilationUnits.add(new EclipseFileObject(null, fi.toURI(), JavaFileObject.Kind.SOURCE, UTF8));
}
// run compiler
try {
JavaCompiler compiler = new EclipseCompiler();
JavaCompiler.CompilationTask compile = compiler.getTask(errorWriter, new EclipseFileManager(Locale.ENGLISH, UTF8),