你好,游客 登录 注册 搜索
背景:
阅读新闻

Apache Commons JCI 1.1 发布

[日期:2013-10-15] 来源:oschina.net  作者:Linux [字体:大 中 小]

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

Apache Commons JCI 1.1 发布了,改进记录:

Changes in this version:

o Updated the API to use generics
o JaninoJavaCompiler is now compatible with Janino 2.6 (JCI-69)
o EclipseJavaCompiler is now compatible with the Eclipse JDT compiler 4.2.2
o Dropped the javac compiler since it only worked with Java 5 (JCI-73)
o Improved the thread safety of FilesystemAlterationMonitor (JCI-74)
o The FilesystemAlterationMonitor thread is now a daemon thread (JCI-65)
o The Eclipse compiler now supports source/target 1.7

Fixed bugs:

o Fixed a NPE in FilesystemAlterationMonitor when the directory is not
readable (JCI-68)
o Compiling classes with cross imports using Janino no longer causes a
stack overflow (JCI-53)
o FilesystemAlterationMonitor no longer throws a NPE when calling stop()
before start() (JCI-62)
o EclipseJavaCompiler properly closes the InputStreams (JCI-58)
o Eclipse compiler settings are no longer ignored (JCI-50, JCI-51)
o Fixed an issue preventing the Eclipse compiler from loading resources
from the ResourceStore (JCI-56)

Commons JCI 的下载地址:请点这里

linux
相关资讯       Commons JCI 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款