我想设置使用javax.tools.JavaCompiler
时生成的.class
文件的路径,该怎么做?
最佳答案
解决方案是
StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
fileManager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(new File("build/classes")));
关于java - 使用JavaCompiler编译代码时如何设置.class文件夹路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31225547/