Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法以编程方式从文件夹中存在的 .java 文件生成类文件。有使用 JavaCompiler.CompilationTask 来编译单个 java 文件的示例。但我需要从多对 .java 代码(从 JAXB gen 生成)生成类文件。
使用 Runtime.getRuntime().exec("javac ...");