开发者

Java - Dynamic Compilation without JDK

开发者 https://www.devze.com 2023-01-05 00:50 出处:网络
im aware that j2se 6 has introduced the JavaCompiler API; however, it\'s cumbersome to use and require a JDK not JRE.

im aware that j2se 6 has introduced the JavaCompiler API; however, it's cumbersome to use and require a JDK not JRE.

Is it possible to do dynamic compilation without a JDK? (im very interested in all-in-memory compilation.)

additionally, i expec开发者_如何学JAVAt the performance to be close to raw java code, so i don't want to use a scripting language like BeanShell or Groovy.

thank you.


You might be interested in Janino, particularly SimpleCompiler. For in-memory compilation, you can use the Reader constructor, and a StringReader.

0

精彩评论

暂无评论...
验证码 换一张
取 消