[kaffe] libraries/clib/native/Field.c
Godmar Back
gback@stanford.edu
Wed, 22 May 2002 09:25:54 -0600 (MDT)
>=20
> 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
>=20
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=20
hacking with loaders is "can't cast 'A' to 'A'".
>=20
> And for bonus points: i18n! Here is my germanized
> version:
>=20
> Ausnahme im Thread "t" in der Threadgruppe "tg":
> java.lang.ClassCastException: kann A nicht zu B casten
> [nach der JVM Spezifikation 2.0 =A71.2.3.4.].
Um Himmels Willen, bitte kein Denglisch in Kaffe.
- Godmar