Package org.codehaus.commons.compiler


package org.codehaus.commons.compiler
This package declares interfaces for the implementation of an IExpressionEvaluator, an IScriptEvaluator, an IClassBodyEvaluator and an ISimpleCompiler. All of these adhere to the syntax of the Java ™ programming language.

There are (at least) two implementations of these interfaces available:

  • org.codehaus.janino, available at janino.net: A lightweight, stand-alone implementation that implements Java 1.4 and half of Java 5. Runs on all JREs starting at version 1.3.
  • org.codehaus.commons.compiler.jdk, also available at janino.net: Uses the javax.tools.JavaCompiler API that is available since Java 1.6. Requires a JDK (not just a JRE).
Notice: Implementations may or may not be prone to "Java injection", i.e. it may or may not be possible to, e.g., break out of the "expression" scope of an IExpressionEvaluator by providing a "bogus" expression text. The documentation of each implementation should state clearly whether or not it is prone to Java injection.