gback at cs.utah.edu
Wed May 22 08:25:54 PDT 2002
> Class A was loaded by system class loader from
> Class B was loaded by YetAnotherClassLoader from
> 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
> Ausnahme im Thread "t" in der Threadgruppe "tg":
> java.lang.ClassCastException: kann A nicht zu B casten
> [nach der JVM Spezifikation 2.0 §126.96.36.199.].
Um Himmels Willen, bitte kein Denglisch in Kaffe.
More information about the kaffe