FileSystemClassFactory factory = new FileSystemClassFactoryImpl();
factory.setBootClassPath(bootClassPath);
factory.setClassPath(classPath);
factory.setSourcePath(sourcePath);
factory.setOutputDir(outputDir);
JavaCompiler compiler = new JavaCompilerImpl();
if (sourceVersion != null) {
compiler.setSourceVersion(sourceVersion);
}
if (targetVersion != null) {
compiler.setTargetVersion(targetVersion);
}
compiler.setDebug(debug);
String[] classNames = new String[fileList.size()];
int i = 0;
Iterator iter = fileList.iterator();
while (iter.hasNext()) {
String fileName = (String)iter.next();
classNames[i++] = factory.makeClassName(fileName);
}
compiler.compile(classNames,
factory,
factory,
factory,
new JavaCompilerErrorHandler() {
public void handleError(String className,