[kaffe] Kaffe for Java like language
robilad at kaffe.org
Wed Oct 19 15:01:06 PDT 2005
Kallol Borah wrote:
> I am new to the Kaffe implementation. But I am interested to evaluate using
> Kaffe for a Java like language called Indus that I and a couple of
> colleagues have implemented for enabling ubiquitous computing. Indus
> compiles to Java bytecode and then further to C code (thats there to support
> Indus on embedded systems). In the case of compilation to byte code, we are
> using java libraries and the jvm now for testing. But soon enough, we have
> to enhance the java libraries and also change the library structure - we
> plan to do this by modifying GNU Classpath.
Cool. Thank you for using GNU Classpath!
> My question is : what is the Kaffe VM's dependencies on GNU Classpath ?
It uses GNU Classpath for the core class libraries. There is a java part
of the class library in GNU Classpath and a native library part (awt
peers, for example). GNU Classpath has a VM interface which contains VM
specific methods that allow the VM to supply its own implementation of
core functionality. Kafefe uses that for a few things, for example,
java.lang.Object. You can find the VM interface classes by looking for
classes with names matching VM*.java.
Kaffe is almost fully merged with GNU Classpath, it only uses its own
implementations for reflection, zip files, network devices and Strings
these days. There are native and java parts of those 'overlays' to the
classpath class libraries. There is a difference between kaffe 1.1.6 and
Kaffe CVS HEAD, since GNU Classpath has been merged more directly into
Kaffe now into CVS HEAD, rather than maintaining it manually mixed up
with the rest of kaffe's class libs. But the general concepts should be
the same. Feel free to ask specific questions, if you know what changes
you'd like to make in advance.
> example, if we change java.lang, how will Kaffe VM be affected ? If we
> identify places in the Kaffe implementation where these dependencies are
> used, it will help us a great deal to port Kaffe, if required.
You have to make sure that your native method signatures still match the
expected ones, to make sure native library loading still works. And
beside the classes in the VM interface, you can replace classes around
quite freely, I believe. That's how the merge between Kaffe's own
classlibraryand GNU Classpath was done, class by class, package by package,
with pretty good results.
More information about the kaffe