Downloads and change log
Back to JANINO home page
Version 2.7.4, Feb 2, 2014 - Download
Version 2.7.3, Jan 19, 2014 - Download
- Implemented 'enhanced FOR statement on Iterable' (with type inference).
- Added parsing of type parameters.
Version 2.7.2, Jan 13, 2014 - Download
- JANINO-167 include Mod.is*() convenience methods
- Allow an 'ArrayType' as a 'TypeArgument'.
- Local variable declaration statement with parameterized type didn't work.
- Added the 'enhanced FOR statement' (except for Iterable, which doesn't make much sense without generics).
Version 2.7.1, Nov 13, 2013 - Download
Version 2.7.0, Aug 10, 2013 - Download
- Added he 'assert' statement (simplified, ASSERTions are ALWAYS enabled, as if '-ea' were given)
- Added annotations (but not yet annotation declarations)
- Implemented '@Override'
- Dropped support for Java 1.4 and 5
Version 2.6.2, May 30, 2013 - Download
Version 2.6.1, June 24, 2010 - Download
- Added version information to the
META-INF/MANIFEST.MF file of the JANINO JARs.
- Fixed up the handling of debug options - added "ICookable.setDebuggingInfo(source, lines, vars)".
- Gave up on "EnumeratorSet" and "DebuggingInfo" - these mimic Java 5 ENUMs and were ugly.
Version 2.6.0, May 30, 2010 - Download
This version implements a number of incompatible changes:
The core functionality of JANINO (expression evaluator, script evaluator, class body evaluator, simple compiler and
Java source class loader) was extracted to new interfaces declared in the new package
CompileException was moved from package
org.codehaus.janino to package
org.codehaus.commons.compiler (and so were its buddies
ScanException were removed; all methods that previously threw
one or more of
CompileException. (This is an API simplification honoring the fact that applications
rarely want to differentiate between scan, parse and compilation problems).
org.codehaus.commons.compiler, while the original API remains unchanged.
A second implementation of the
org.codehaus.commons.compiler interfaces was added, based on the
javax.tools.JavaCompiler API that exists since JDK 1.6. This implementation is available in the
Rather than instantiating e.g.
org.codehaus.janino.ExpressionEvaluator directly, applications can now
which will use the first implementation of
IExpressionEvaluator on the class path (be it
commons-compiler-jdk.jar, or yet another implementation).
The JUNIT regression test suite was restructured so that if differentiates between implementation-independent tests,
which are automatically executed against every implementation on the class path, and implementation-specific tests.
Also, the following bugs were fixed:
Version 2.5.16, January 26, 2010 - Download
Version 2.5.15, June 18, 2008 - Download
Version 2.5.14, April 27, 2008 - Download
- Switched from CVS to svn (http://svn.codehaus.org/janino).
Version 2.5.13, March 9, 2008 - Download
Version 2.5.12, December 20, 2007 - Download
Version 2.5.11, September 30, 2007 - Download
- "CompileException" now extends "LocatedException", which extends "CausedException". This
eliminates an asymmetry between "ScanException", "ParseException" and "CompileException".
Version 2.5.10, September 4, 2007 - Download
Version 2.5.9, July 22, 2007 - Download
Version 2.5.8, June 12, 2007 - Download
Version 2.5.7, May 19, 2007 - Download
Version 2.5.6, February 26, 2007 - Download
Version 2.5.5, February 3, 2007 - Download
Version 2.5.4, January 28, 2007 - Download
Version 2.5.3, January 17, 2007 - Download
- Added single static import declarations for
import static java.util.Collections.EMPTY_MAP),
import static java.util.Map.Entry)
and methods (e.g.
import static java.util.Arrays.asList)
- Added static-import-on-demand declarations for
import static java.util.Collections.*),
import static java.util.Map.*)
and methods (e.g.
import static java.util.Arrays.*)
Version 2.5.2, January 14, 2007 - Download
Version 2.5.1, November 6, 2006 - Download
Version 2.5.0, September 19, 2006 - Download
ScriptEvaluator with the capability
to compile more than one expression/script in one evaluator. This greatly improves the runtime
performance and reduces the JVM resource usage if you need to compile many expressions/scripts at
the same time.
- Introduced the concept of "auxiliary classes". This allows you to specify individual classes
that the expression/script/class body/compilation unit may access although they are not
loadable through the
ClassLoader that was set with
setParentClassLoader(). In other words: The expression/script/class body/compilation
unit executes in a "sandbox", restricted by a
ClassLoader with minimal peepholes
to the classes you specify. This also resolves issue
JANINO-66 Security: restrict package access
Version 2.4.7, September 11, 2006 - Download
Version 2.4.6, August 20, 2006 - Download
- Added some very picky checks on character literals.
- Check for float literal overflow and underflow.
- ExpressionDemo was broken since the *Evaluator refactoring.
- Some minor refactoring.
- Added more tests on float literals.
- Refactoring of ClassBodyDemo and friends (more user friendly command line interface).
- JANINO-64 continue statement not enclosed bug
- JANINO-65 Janino 2.4.5 does not compile with JDK 1.5
Version 2.4.5, June 26, 2006 - Download
- Removed the misspelled "ResourceFinder.NO_RESOURCE_FINDER" (use
- Simplified the self-compile test.
- Cleaned up and simplified the local variables used by the TRY statement.
- JANINO-56 VerifyError in the context of a
Version 2.4.4, June 18, 2006 - Download
Version 2.4.3, May 11, 2006 - Download
- Added the "default imports" feature to all
Scanner.close() and all file-related
constructors are now deprecated, because (A) they sometimes left
input files open and (B) the logic was confusing - it is now strictly
the caller's responsibility to open and close input files.
- Complete refactoring of the
*Evaluator and the
classes. Important notice:
ScriptEvaluator.evaluate() had to be renamed to
ScriptEvaluator.getClazz() due to a method signature clash with
- Improved the JAVADOC of the
*Evaluator and the
- JANINO-53 Java.NewClassInstance.toString() does not include arguments
- JANINO-54 Code missed out after "if (true) return;"
- JANINO-55 Nested array initializers no longer work in 2.4.2
Version 2.4.2, April 24, 2006 - Download
Version 2.4.1, April 12, 2006 - Download
Version 2.4.0, March 13, 2006 - Download
- Major redesign of the
Java class hierarchy -- basically the
"uplink" of the AST objects is no longer set by a constructor parameter, but by the
constructor of the superordinate AST object. As a consequence, the creation order
of AST objects is no longer top-down, but bottom-up. This makes code that creates an AST
UnitCompiler is now context-free, i.e. it can resolve types, constant
values etc. without compiling the unit. This is necessary for the upcoming
JGrep utility (see below).
- Started work on the new
JGrep utility -- a command line tool that analyses
a set of source files in a highly configurable way.
- JANINO-43 RuntimeException "Cannot relocate branch to unset destination offset" during compilation
- JANINO-50 Branch offset out of range exception
Version 2.3.18, February 23, 2006 - Download
Version 2.3.17, January 18, 2006 - Download
Version 2.3.16, December 25, 2005 - Download
Version 2.3.15, November 9, 2005 - Download
Version 2.3.14, November 2, 2005 - Download
- Added the
Version 2.3.13, October 28, 2005 - Download
- Added the missing
Version 2.3.12, October 25, 2005 - Download
- The creation of class files by
is now based on the new
ResourceCreator class, so they
can not only be stored in files but anywhere (e.g. in a database).
(Requested by Andreas Schmidt 2005-10-19.)
Version 2.3.11, October 19, 2005 - Download
Traverser for static code analysis.
- Removed some superfluous getters.
- Renamed some productions from "*Declarator" to "*Declaration".
(It is sometimes difficult to understand the difference between the two.)
visit(...) methods to
conformance with GoF "Design Patterns".
- JANINO-34 Propose changes to visitor to make it easier to implement
Version 2.3.10, October 18, 2005 - Download
Version 2.3.9, October 11, 2005 - Download
Version 2.3.8, August 9, 2005 - Download
Version 2.3.7, July 24, 2005 - Download
Version 2.3.6, July 15, 2005 - Download
Version 2.3.5, July 06, 2005 - Download
Version 2.3.4, May 25, 2005 - Download
Version 2.3.3, May 05, 2005 - Download
Version 2.3.2, March 22, 2005 - Download
Scanner.Location a top-level class.
ImportDeclaration are now
ResourceFinder.findResource() no longer returns a
URL object, but a more abstract
object (requested by Michael Orth 2005-03-22).
Version 2.3.1, February 20, 2005 - Download
Version 2.3.0, January 31, 2005 - Download
Version 2.2.0, January 02, 2005 - Download
Version 2.1.0, December 09, 2004 - Download
- Switched from GNU "Lesser General Public License" (LGPL) to Apache License 2.0.
equals()code> methods to
Version 2.0.17, December 06, 2004 - Download
Version 2.0.16, November 19, 2004 - Download
Version 2.0.15, November 9, 2004 - Download
Version 2.0.14, November 1, 2004 - Download
Version 2.0.13, October 27, 2004 - Download
- More refactoring of the "IClassLoader" hierarchy. Added some nifty
TransformingIterator, and the
Collection that reads its elements from
Iterator while it is being iterated for the first time).
net.janino.tools.Disassembler now has a verbose mode.
Version 2.0.12, October 17, 2004 - Download
- Total rewrite of the "IClassLoader" hierarchy. This simplifies the lookup of
- Cache the return values of
- Eliminated a lot of compilation warnings.
Version 2.0.11, September 27, 2004 - Download
Version 2.0.10, September 14, 2004 - Download
now add SOURCE and LINES debugging info, so file name and line number appear in exceptions
thrown by generated code. (Requested by Mike Hebert 2004-09-11.)
Allow for source code level debugging of the same by writing a temporary source code file
optionalFileName parameter of
null and system property
net.janino.source_debugging.enable is "true". The source code file is written
net.janino.source_debugging.dir or the system's default temp directory.
(You need to add that directory to your debugger's "source lookup path".)
Version 2.0.9, September 5, 2004 - Download
- Unparsing classes generated by
EvaluatorBase generated no output.
- Optimized compilation of constantly-false IF statements.
- #1001362 null in expression with conditional
- Fixed up JLS2 22.214.171.124.BL2.
Version 2.0.8, August 29, 2004 - Download
- Fixed several bugs in the
- Decimal long literal tokens were misinterpreted as octal.
Version 2.0.7, August 25, 2004 - Download
- Implemented the
net.janino.UnparseVisitor that unparses a
parsed construct, e.g. a compilation unit (requested by Mark Proctor).
- Made all nested classes of
net.janino.Java public to allow for
generation of "synthetic" constructs (requested by Mark Proctor).
Version 2.0.6, July 23, 2004 - Download
- #995198 Make info public in exceptions
- Introduced base class
net.janino.Scanner.LocatedException for all
- Fixed some JDK 1.2.2 compatibility problems.
Version 2.0.5, July 12, 2004 - Download
Version 2.0.4, June 29, 2004 - Download
Version 2.0.3, May 31, 2004 - Download
net.janino.ExpressionEvaluator now supports
expression types; this auto-wraps primitive values as necessary. (Requested by
Amir Bar-Or 2004-05-31).
Version 2.0.2, April 15, 2004 - Download
- Janino now optionally creates warnings.
- Added warnings about implicit access to fields
- Added warnings about violations of SUN's naming conventions (JLS2 6.8)
Version 2.0.1, April 11, 2004 - Download
Version 2.0, April 4, 2004 - Download
A major milestone... Janino now supports member types, local classes and anonymous classes.
Therefore you can legitimally call a fully implemented JavaTM compiler!
A good time to open a bottle of champagne...
Version 1.0.22, February 16, 2004
net.janino.Compiler now reports up to 20 compile errors before it gives up.
(Notice that scanning, parsing and I/O exceptions are still fatal and terminate compilation.)
Version 1.0.21, February 03, 2004
Version 1.0.20, January 27, 2004
- Implemented line number tables ("-g:lines") and source file information ("-g:source").
Version 1.0.19, January 24, 2004
Version 1.0.18, January 24, 2004
- Fixed up resolution of class names (JLS 126.96.36.199).
Version 1.0.17, January 21, 2004
Version 1.0.16, January 17, 2004
- Fixed one "Invocation of constructor/method ... is ambiguous" bug reported by Chris Cleveland 2004-01-14 03:26.
- #879380 Missing class
Version 1.0.15, January 17, 2004
Version 1.0.14, January 12, 2004
Version 1.0.13, January 8, 2004
Version 1.0.12, January 7, 2004
Version 1.0.11, January 6, 2004
Version 1.0.10, January 4, 2004
Version 1.0.9, January 3, 2004
Version 1.0.8, January 2, 2004
Version 1.0.7, December 25, 2003
Version 1.0.6, December 15, 2003
- Added the "JavaSourceClassLoader" (requested by Richard Lewis 2003-11-14) and the "janino"
utility that scans, parses, compiles, loads and executes classes on-the-fly.
Version 1.0.5, November 26, 2003
Version 1.0.4, November 18, 2003
Version 1.0.3, November 12, 2003
Version 1.0.2, October 30, 2003
Version 1.0.1, October 23, 2003
Version 1.0, October 20, 2003
- Wow, version 1.0 finally made it. If you also feel that Janino 1.0 were
a good reason to drink a glass of champagne, do not hesitate. (Maybe, as
a sign of recognition, you could send me the open bottle and I'll drink
it up ;-) My postal address is on janino.net)
Version 0.3.17, October 09, 2003 (not released)
- Methods declared in interfaces of object were not found when invoked
(reported by Fabrice Carnet 2003-10-07).
- java.lang.VerifyError when loading a class compiled by Janino which
invokes a method of an interface with more than zero parameters
(reported by Fabrice Carnet 2003-10-07).
- ExpressionEvaluator, ScriptEvaluator and ClassBodyEvaluator now have
constructors that allow for the specification of class and/or method
name (requested by Fabrice Carnet 2003-10-07).
Version 0.3.16, October 06, 2003 (not released)
- Basically a complete rewrite of the IClass loading mechanism. This solves
many problems related to using Janino with custom ClassLoaders (e.g. in
J2EE environments). (Reported by Laurent Millet 2003-09-24.)
Version 0.3.15, September 12, 2003
- "net.janino.*Evaluator" now have constructor variants that allow the
specification of extended / implemented types. This allows for providing
a base class that supplies static "helper functions" (e.g. "println()").
(Requested by Till Brychcy 2003-09-10.)
Version 0.3.14, July 27, 2003
- "net.janino.Compiler" can now compile a set of source files with forward
references (requested by Richard Lewis 2003-07-24).
- Documented the "import" feature of ScriptEvaluator and ExpressionEvaluator.
- "Outer.Inner" was not properly resolved within ambiguous names.
Version 0.3.13, July 6, 2003
- Rewrote the "ClassBodyEvaluator"; can now be instantiated.
- "ClassBodyEvaluator" can now generate a class that extends / implements
classes / interfaces (Requested by Richard Lewis 2003-06-28).
- Cleaned up "EvaluatorBase"; eliminating code duplicated between the various
Version 0.3.12, June 4, 2003
- Fixed up method invocation conversion (reported by Antony Miguel
- Fixed a problem with for/while/do loops with constant true conditions.
(Reported by Antony Miguel 2003-06-02).
- Made tons of methods and classes PUBLIC, as proposed by Antony Miguel
Version 0.3.11, June 1, 2003
- Implemented "synchronized" statement (requested by Antony Miguel 2003-05-22).
- Moved common functionality from "ExpressionEvaluator", "ScriptEvaluator"
and "ClassBodyEvaluator" into a common base class "EvaluatorBase".
- The generated class files and the
IClassLoader used to load
classes defined outside the current compilation unit are now stored in
thread-local globals. The
IClassLoader also holds the formerly
IClass cache, which caused a memory leak (reported by
Fabrice Carnet 2003-05-20).
IClass.isAssignableFrom(net.janino.IClass) did not handle primitive types (reported
by Fabrice Carnet 2003-05-20).
- Multiple expressions, scripts and class bodies can now be loaded into the
ClassLoader, if that is a
This is necessary if the expressions, scripts and classes need to refer to each other.
(Requested by Fabirce Carnet 2003-05-20.)
- A "for" statement with an empty condition (e.g. "for(;;)") caused a
net.janino.ClassLoaderIClassLoader.ReflectionIClass holds a map
that guarantees that
map one-to-one. This posed a memory leak. (Reported by Fabrice Carnet 2003-05-20.)
- Documented the
Version 0.3.10, April 22, 2003
- Fixed up invocation of interface methods (reported by Reimond Bernstein
- Added references to types in same package, but different compilation unit.
- Fixed up C-style array variable declaration ("int a = ...") (reported
by Reimond Bernstein 2003-04-14).
Version 0.3.9, April 02, 2003
- Added the "ClassBodyEvaluator" and the "ClassBodyDemo" class. These allow
you to compile a "class body", i.e. a series of methods, variable
declarations etc. (requested by Fabrice Carnet 2003-03-18).
- Fixed up "IClass.getArrayType()" which only worked for loaded classes, but
not for classes in the current compilation unit.
java.lang.ClassLoader used to load the just-compiled
class now uses as its parent the current thread's context class loader
(reported by Fabrice Carnet 2003-03-26).
Version 0.3.8, March 05, 2003
- Fixed a bug in the flow analysis code (caused a compile-time error)
(reported by Fu Li Chen 2003-02-21).
- "IClass" now uses
of "Class.forName()" (feature requested by Dain Sundtrom 2002-02-16).
Version 0.3.7, November 26, 2002
- Added "this" (reference to current instance). Added primitive class
literals (e.g. "int.class"). Fixed several showstopper bugs. Added
limited support for member classes.
Version 0.3.6, November 22, 2002
- Added reference comparison. Added ScriptEvaluator constructors that read
from InputStream, Reader or Scanner.
Version 0.3.5, November 14, 2002
- Only the last import-on-demand directive in a compilation unit did work;
using a class imported by an amport-on-demand directive other than the
last one caused a compilation error. (Reported by Audrius Meskauskas
Version 0.3.4, November 9, 2002
- Updated the overview page.
Version 0.3.3, October 26, 2002
- Renamed "ExpressionTest" and "ScriptTest" to "...Demo". Fixed up several
JAVADOC bugs. "ExpressionEvaluator" now has a "thrownExceptions"
parameter. Added support for "void" type expressions to
"ExpressionEvaluator". Added JAVADOC comments. Clean up. Fixed a bug in
Version 0.3.2, October 21, 2002
- Fixed a few more bugs reported by Jimmy.
Version 0.3.1, October 13, 2002
- Fixed an ArrayStoreException in ScriptEvaluator that was reported by
Russell White 2002-06-25.
- Added reclassification of fully qualified type names: E.g. cast operation
"(HashMap) xyz" did work, but "(java.util.HashMap) xyz" didn't. Reported
by Jimmy 2002-10-13.
Version 0.3, May 25, 2002
- Added most missing language elements that I planned to add. The JLS is
now almost completely implemented, except for nested classes and
- This is the first version of JANINO that I will "advertise". Let's see
if anybody wants to use the tool... After all it's a 80 percent complete
JavaTM compiler in only 11000+ (well-documented) lines of
Version 0.2, April 28, 2002
- Almost a rewrite. Added several painfully missing language elements.
- Added more JAVADOC.
Version 0.1.1, November 09, 2001
- Added missing sample source files to the runtime package.
- Added lots of JAVADOC comments.
Version 0.1, October 30, 2001
Signed JAR files of the latest version: commons-compiler.jar