Java examples for javax.tools:JavaCompiler
get File Manager for Java Compiler
import javax.tools.JavaCompiler; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; import javax.tools.ToolProvider; public class Main{ public static void main(String[] argv) throws Exception{ System.out.println(getFileManager()); }/*from w ww . j ava 2 s .c o m*/ public static JavaFileManager getFileManager() { final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); return new ClassFileManager(compiler.getStandardFileManager(null, null, null)); } }