Package org.abstractmeta.toolbox.compilation.compiler.impl

Examples of org.abstractmeta.toolbox.compilation.compiler.impl.JavaSourceCompilerImpl.compile()


                    JavaSourceCompiler.CompilationUnit compilationUnit = javaSourceCompiler.createCompilationUnit();
                    if (!dependencies.isEmpty()) compilationUnit.addClassPathEntries(dependencies);

                    try {
                        compilationUnit.addJavaSource(fileName.replace(".java", ""), readFile(f.getAbsolutePath()));
                        ClassLoader classLoader = javaSourceCompiler.compile(compilationUnit);
                        Class<dExternal> load = (Class<dExternal>) classLoader.loadClass(fileName.replace(".java", ""));
                        dExternal loadedClass = load.newInstance();
                        loadedClass.load();
                        loadedExternals.add(loadedClass);
                    } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.