Kaffe and the Kore Class Libraries

Jump to:
  • News and Developments.
  • Description of Kore.
  • Download source.
  • Installing and Compiling Kaffe+Kore and/or Kore.
  • Feedback and Bug Reports.
  • Related Projects.
  • The Kore Class Libraries are a clean-room implementation of the core class libraries in Sun's JDK 1.0.2. Core class libraries means the java.* packages. (Including a re-implementation of the AWT.) Kaffe is a free Virtual Machine for interpreting Java bytecodes. This page deals with the support necessary in Kaffe to use the Kore class libraries.

    -----

    News:

  • July 23, 1998: I won't be making anymore releases of my Kaffe+Kore hacks, as I will just be migrating my code to the Kaffe class libraries.
  • July 15, 1998: The latest version of Kaffe (see ftp.transvirtual.com) includes a (mostly) full implementation of the JDK 1.1 core classes (including Beans, the AWT, Reflection, etc). So unless you need AWT-less JDK 1.0.2 support, I'd suggest going with that over Kore.
  • May 7, 1998: Moved the Kore Web pages to their new home: http://www.cs.utah.edu/projects/flux/java/kore
  • April 5, 1998: The newest version of Kaffe is available (see ftp.transvirtual.com). Kaffe's internals have been restructured (which is a good thing in the long run) but in the short run makes moving the changes for Kore difficult. I haven't got the time to make this upgrade, but if anyone else is interested, please go right ahead.
  • February 22, 1998: Added the Related Work section.
  • December 23, 1997: BISS-0.87 "ported" to Kaffe+Kore. See below.
  • December 22, 1997: Alpha 2 release of Kaffe+Kore, supports Kore v0.0.7.
  • December 19, 1997: Glynn released Kore v0.0.7. (UK or Utah)
  • December 11, 1997: Made a (separate) .tgz with Makefiles for Kore available for download.
  • November 26, 1997: Everything is new. Initial release, Alpha 1, of Kaffe support for Kore.
  • -----

    Description:

    We haved added support to the Kaffe Virtual Machine to use the Kore native libraries in place of Sun's. In addition to a Kore native library "package" in Kaffe, this required some modifications to Kaffe's basic VM facilities (as the VM needs to understand the new String, Thread, and Throwable classes). By selecting the --with-kore configuration option, Kaffe will use the Kore native libraries. Otherwise, it will default to the present Sun native library support.

    This work was performed by members of the Flux Research Group at the University of Utah. (Patrick Tullmann <tullmann@cs.utah.edu> is the contact person for technical questions about Kore.)

    Kore is maintained by Glynn Clements (he also wrote most of it). The latest distribution is available at ftp://sensei.co.uk/misc/ as kore-something.tar.gz where something is the version number. (Latest version as of this writing is 0.0.7.)

    More information on Kaffe is available at http://www.kaffe.org/. Jim Pick maintains a mailing list for Kore. To sign up, send a message with "subscribe" in the body to: kore-list-request@jimpick.com. (To unsubscribe send a message with "unsubscribe" in the body to the same address.) The archive is also maintained by Jim.

    Status: Kore is distinctly a work-in-progress. Quoting from the Kore README:

    Virtually all non-native functions in java.* are implemented, although some are fudged, and many doubtless have bugs.

    If Kore is a work-in-progress then that goes double for our changes to Kaffe. We have tested them on IRIX and FreeBSD with all combinations of JIT/interpreter, static/dynamic libraries, debug/nodebug and sun/kore. The Kore support is functional enough that Sun's javac can compile `HelloWorld' when run "on top" of the Kore native libraries. The thread support is functional enough that it passes basic threading tests. We do the majority of our development with a statically linked, interpreter version of Kaffe (on FreeBSD), so that will be the most stable configuration.

    Note: The Kore AWT implementation will not work with Kaffe, mostly because there is no support in Kaffe for a GUI Toolkit. (See the BISS downloads, below, for a set of hacks working towards GUI Toolkit support for Kore.)

    These changes are not (yet) part of the Kaffe distribution. Currently, all the patches are against Kaffe version 0.9.2, and the latest Kaffe release has a revamped internal structure. Additionally, upcoming releases of Kaffe will have an independently developed set of standard libraries.

    You can peruse the ChangeLog entry detailing the changes I've made to Kaffe. In short they are:

  • Kore support
  • Dynamic debugging support (via -vmdebug command line option)
  • Automagic dependency generation in the makefiles (--enable-depend configuration option).
  • Code cleanup (complies 98% clean with '-Wall')
  • -----

    Download:

    Kaffe+Kore:

    A patch for Kaffe v0.9.2
    A patch to Kaffe v0.9.2 to provide support for Kore v0.0.7 (78k gzipped, 390k unzipped). Touches approximately 100 files and creates about 50. This patch includes some of the bug fixes to v0.9.2 posted to the Kaffe mailing list. (Alpha 2)
    A patch for the previous release of Kaffe+Kore.
    A patch to bring the first release of Kaffe+Kore to "Alpha 2" (I'm retroactively naming the previous release of Kaffe+Kore "alpha 1") (6k gzipped, 33k unzippped.)
    Kaffe+Kore (Alpha 2)
    The entire Kaffe source tree with the Kore extensions (820k gzipped, 7.5Mb un-tgz'd). This version support Kore v0.0.7. This tree includes some of the bug fixes to v0.9.2 posted to the Kaffe mailing list.
    Kore Source v0.0.7
    Unadulterated source for Kore.
    Makefiles for Kore
    Some Makefiles for Kore. These suffer from bit-rot, but they may be a better start than from scratch. They require GNU make. Please send me updates if you make any changes. (Personally, I just use `find java -name "*.java" | xargs javac' to compile Kore.)

    BISS+Kore:

    This patch is not guaranteed to work. I merely got BISS-AWT to compile with Kaffe+Kore and it seems to link in. It seems to blow up in the initialization of the Toolkit. I'm not sure if this is Kore AWT bug or a BISS/Kaffe hack bug.
    The BISS distribution hacked for Kaffe+Kore.
    This 687k download is a patched version of the BISS source to work (?) with Kaffe+Kore. It also includes compiled .class files. The C code for the native library is not pre-compiled, of course. See the README.Kore in the distribution for details.
    A Patch to BISS-0.87 to make it work with Kaffe+Kore.
    This patch takes a BISS-0.87 distribution and makes it work like the full version above.
    -----

    Installing and Compiling:

    Installation should proceed as before with Kaffe. To compile Kaffe to use the Kore native libraries don't forget to include --with-kore on the configure command line.

    To re-compile the Kore classes if you make changes, you'll need a working javac (Kore cannot yet "host" itself.) Make sure to add the base Kore classes.zip to the end of your CLASSPATH (or not at all). The unix 'find' command works quite well for the actual compile:

    find java -name "*.java" -print | xargs javac

    Insert the Kore classes.zip in your CLASSPATH before Sun's classes.zip. (Be sure to use the classes.zip from a version 1.0.2 JDK.) This should let you use the Kore classes, and fall back to Sun classes for missing or Sun-specific code.

    Warning: If the Kore classes are not being found, and instead the Sun classes are found you will get the following error (or some other, equally obscure fault):

    assertion "(uintp)mem >= (uintp)blk && (uintp)mem < (uintp)blk + gc_pgsize" failed: file "kaffe/kaffevm/gc-mem.c", line 175

    This happens because the Kore objects are different sizes than the Sun objects and they have different layouts. This is an active bug.

    -----

    Feedback:

    Send it to tullmann@cs.utah.edu. Let me know if you have troubles with the patches or compiling or anything.

    You may send patches for Kore to Glynn Clements or myself (I'll forward them on to Glynn eventually).

    Send patches for Kaffe to me (if they relate to making Kaffe work with Kore). You can send me other Kaffe patches, but those are best sent to Tim Wilkinson directly (they'll get swallowed in my big diff).

    -----

    Related Projects:

    There is Kaffe, the Java-bytecode compatible Virtual Machine.

    The JOS Project (Java Operating System) aims to build a free and open Java-based OS from the ground up.

    Other Flux Java Projects. The Flux group is an operating systems research group here at the University of Utah. We have several Java-related research projects underway.


    Flux Project
    University of Utah, Computer Science Department.
    Last modified: Thu Jul 23 22:52:33 MDT 1998