The Java Compiler Kit is a straightforward implementation of a Java compiler, designed with extensibility in mind. In building the JKit compiler, the aims were: firstly, to help with teaching compilers by considering an implementation for a fully fledged language (Java), rather than a stripped-down imitation language; secondly, to aid research in programming languages, compilers and verification. With JKit you can easily prototype new extensions to the Java language, or implement completely new languages and compile them down to Java Bytecode.


  • JPure: a Modular Purity System for Java. David J. Pearce. In Proceedings of the Conference on Compiler Construction, (to appear), 2011. [ Postscript / PDF / Conference Website ]

  • Java Bytecode Verification for @NonNull Types. Chris Male, David J. Pearce, Alex Potanin and Constantine Dymnikov. In Proceedings of the Conference on Compiler Construction (CC), volume 4959 of Lecture Notes in Computer Science, pages 229-244, 2008. © Springer-Verlag [ Postscript / PDF / Conference Website ]. An extended technical report version is also available [ Postscript / PDF ], while the tool can be obtained from here.


0.6.3 September 2010 UNIX (inc. Linux) / Cygwin jkit-v0.6.3.tgz book icon
0.6.2 May 2010 UNIX (inc. Linux) / Cygwin jkit-v0.6.2.tgz book icon
0.6.1 May 2010 UNIX (inc. Linux) / Cygwin jkit-v0.6.1.tgz book icon
0.6.0 November 2009 UNIX (inc. Linux) / Cygwin jkit-v0.6.0.tgz book icon
0.5.2 September 2009 UNIX (inc. Linux) / Cygwin jkit-v0.5.2.tgz book icon
0.5.1 July 2009 UNIX (inc. Linux) / Cygwin jkit-v0.5.1b.tgz book icon
0.5 July 2009 UNIX (inc. Linux) / Cygwin jkit-v0.5.tgz book icon
0.3 April 2008 UNIX (inc. Linux) / Cygwin jkit-v0.3.tgz book icon
0.2 March 2008 UNIX (inc. Linux) / Cygwin jkit-v0.2.tgz book icon
0.1 March 2008 UNIX (inc. Linux) / Cygwin jkit-v0.1.tgz book icon


A useful introduction to JKit can be found here, whilst the JKit Javadoc provides useful information on the classes and methods provided by JKit.


Unpack the jar file into an appropriate directory. Then, add the bin/ subdirectory onto your PATH environment variable. For UNIX/Cygwin, you can do this by editing you .bashrc or .cshrc files appropriately. You now need to download the ANTLR 3.1 package from and ensure that the antlr-3.1-runtime.jar file is on the CLASSPATH. At this point, you should be able to run jkit to compile Java files as follows:

% jkitc

To recompile the source code from scratch, you can use the supplied build.xml file with ANT. If you want to recompile the JKit parser using ANTLR, you will also need to have the antlr-2.7.X.jar and stringtemplate-3.1X.jar files on the classpath. See the ANTLR website for more details on running ANTLR.


A list of tools which build upon JKit:

  • Mocha - Mocha is a language extension to Java which provides local type inference.


Some useful links related to this project:

  • Spoon - Spoon is a Java program processor that fully supports Java 5 and 6. It provides a complete and fine-grained Java metamodel where any program element (classes, methods, fields, statements, expressions...) can be accessed both for reading and modification.
  • Wala - The T. J. Watson Libraries for Analysis (WALA) provide static analysis capabilities for Java bytecode and related languages.
  • Jikes - Jikes is a high-performance, certified open-source Java Compiler.
  • Polyglot - a well-known extensible Java compiler framework.
  • JastAdd - another, more recent, extensible compiler framework.
  • SOOT - a Bytecode optimisation framework.
  • ASM - A small and efficient bytecode manipulation framework.