Another reflection bug; compatibility results

Edouard G. Parmelan Edouard.Parmelan at
Thu Jun 15 08:06:36 PDT 2000

Stuart Ballard wrote:

> The issue of calling <clinit> came up when Edouard suggested using a
> Classloader to make it possible to load libraries of other
> implementations (eg load the JDK1.0 classes from Kaffe so that I could
> print the API of 1.0, even though it doesn't have reflection). The
> problem with doing this would be that the act of asking for a public
> static final field's value would cause <clinit> to load, which would
> cause nasty native code conflicts.

I have implement my idea, and this is my final report.

1. It's not possible to load java.lang.Object

With Sun JDK 1.2.1, even with his own java.lang.Object, we got:
java.lang.ClassFormatError: java/lang/Object

With Kaffe it's
Kaffe: /home/gnu/kaffe-cvs/kaffe/kaffevm/classMethod.c:269: processClass: Assertion `(class == ObjectClass) || (class->superclass != ((void *)0))' failed.

this could be fixed by changing all use of ObjectClass.

2. It's not possible to load java.lang.Throwable with JDK1.2

java.lang.LinkageError: non-standard Throwable class loaded

Kaffe does not check that.
Edouard G. Parmelan

More information about the kaffe mailing list