Quick Links:

Releases | Mailing Lists | Source Control | Issue Tracker | Regression Tests

17 Interface to the Class Library

Chapter 17
Interface to the Class Library

The Jikes RVM currently only supports GNU Classpath. A long time ago, the Jikes RVM also supported Apache Harmonoy. Support for OpenJDK/IcedTea is planned but still far from usable.

The description here focusses on the current state for GNU Classpath which defines an explicit interface to the virtual machine implementation. Supporting OpenJDK will require significant changes to the interface to the class library. Those changes are not described here.

17.1 Overview

The current library interface is found in the directory libraryInterface. It is divided in the common parts that are necessary for all class libraryies and the parts that differ for each class library. The parts specific to the class library are further grouped according to the licenses that apply to the respective parts.

The common parts include sun.misc.Unsafe which is implemented via Jikes RVM Magic.

17.2 GNU Classpath VM interface

GNU Classpath defines certain classes that have to provided by the VM vendor. Those classes are generally named VM*, e.g. VMString, VMSystem, VMThrowable. Implementations for those classes can be found at
libraryInterface/GNUClasspath/EPL/src. GMU Classpath also provides default versions for those classes. In some cases, the default versions are used.

Jikes RVM also directly replaces some classes from GNU Classpath with modified versions. Those classes are found at
libraryInterface/GNUClasspath/LGPL/src.

17.3 Naming conventions

Classes that are named JikesRVMSupport implement methods that Jikes RVM needs to interact with the class library.

17.4 Build organisation

The class library interface and the class library itself are compiled into a single jar file, rvmrt.jar. The classes from the libraryInterface directory always have priority over those from the class library. This allows replacement from classes from the class library, e.g. for debugging.

The build also has a step to add annotations to classes from the class library using ASM. This is implemented by the class org.jikesrvm.tools.asm.AnnotationAdder.