- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://commons.apache.org/jci/
- 软件文档: http://commons.apache.org/jci/usage.html
软件介绍
JCI 是一个封装了 Java 编译器的类库。
示例代码:
JavaCompiler compiler = new JavaCompilerFactory().createCompiler("eclipse");
CompilationResult result = compiler.compile(sources, new FileResourceReader(sourceDir), new FileResourceStore(targetDir));
System.out.println( result.getErrors().length + " errors");
System.out.println( result.getWarnings().length + " warnings");
支持的编译器包括:
- eclipse
- janino
- groovy
- javac
- rhino
