String fullName = javaSource.getPackageName() + "." + javaSource.getClassName();
Class newClass = compileTask.compile(fullName, javaSource.getSource(), errs);
return newClass;
} catch (JdkCompileException ex) {
DiagnosticCollector<JavaFileObject> diagnostics = ex.getDiagnostics();
throw new CompileExprException("compile error, source : \n" + javaSource + ", "
+ diagnostics.getDiagnostics(), ex);
} catch (Exception ex) {
throw new CompileExprException("compile error, source : \n" + javaSource, ex);
}
}