Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
packages
packages

Packages

If you are using MAVEN, add this entry to your POM file:

Code Block
languagexml
<dependency>
   <groupId>org.codehaus.janino</groupId>
   <artifactId>janino</artifactId>
   <version>2.7.5</version>
</dependency> 

(Replace '2.7.5' with the very latest version of JANINO.)

If you are not using MAVEN, do the following instead:

...

Installation

...

  • Unzip the distribution file you have downloaded:
Code Block
languagebash
$ jar xvf janino-*.zip
  • Change to the Janino directory:
Code Block
languagebash
$ cd janino-*

You will find the Janino JAR files, the source code ZIP files, the text of the BSD license, and a README file.

  • Put "commons-compiler.jar" and "janino.jar" on your class path.

Anchor
Installation
Installation

Installation

If you're using an IDE like ECLIPSE, you can optionally have "commons-compiler-src.zip" as the source attachment of "commons-compiler.jar", and "janino-src.zip" as the source attachment of "janino.jar". That'll get you tooltip JAVADOC and source level debugging into the JANINO libraries.

Use one of the features, e.g. the "expression evaluator", in your program:

Code Block
languagejava
    import org.codehaus.janino.*;

    ExpressionEvaluator ee = new ExpressionEvaluator();
    ee.cook("3 + 4");
    System.out.println(ee.evaluate(null));

...