[kaffe] libraries/clib/native/Field.c

Godmar Back gback at cs.utah.edu
Wed May 22 08:25:54 PDT 2002

> Class A was loaded by system class loader from
> file://A.class.
> Class B was loaded by YetAnotherClassLoader from
> http://b-class.org/B.class.
> Class YetAnotherClassLoader was loaded by system class
> loader from file://YetAnotherClassLoader.class

You can't call .toString() here if it's a user-defined loader,
and just printing the class of the loader may not help you much.
Just print the hex number/hashcode() of the classloader's address in that
case.  That's usually sufficient.  But your point is definitely
important; in fact, the error msg that I was often getting when 
hacking with loaders is "can't cast 'A' to 'A'".

> And for bonus points: i18n! Here is my germanized
> version:
> Ausnahme im Thread "t" in der Threadgruppe "tg":
> java.lang.ClassCastException: kann A nicht zu B casten
> [nach der JVM Spezifikation 2.0 §].

Um Himmels Willen, bitte kein Denglisch in Kaffe.

	- Godmar

More information about the kaffe mailing list