[kaffe] Kaffe CVS: kaffe hkraemer

Helmer Krämer hkraemer@freenet.de
Mon May 19 12:01:01 2003


On Sun, 18 May 2003 15:43:59 -0600 (MDT)
Timothy Stack <stack@cs.utah.edu> wrote:

Hi Tim,

sorry for the delay, I had to spend some time at the university
today.

> > * libraries/clib/native/ClassLoader.c:
> > (java_lang_ClassLoader_loadArrayClass) new method
> 
> > * libraries/javalib/java/lang/ClassLoader.java:
> > (loadArrayClass) new method
> 
> Why was this added?  And, does your ArrayForName fail too?

In order to be able to load the class of the elements
of an array, the vm may have to call a user defined
class loader, which has to be passed to loadArray().
In order to achieve this, I thought it would be the
easiest way to create a loadArrayClass method which
would basically call loadArray(this) so that the vm
would call the classloader whose loadArrayClass method
was invoked in order to load the class of the elements
of that array. 
 
> java.lang.VerifyError
>         at java.lang.ClassLoader.loadArrayClass(ClassLoader.java:native)
>         at java.lang.Class.forName(Class.java:72)
>         at java.lang.Class.forName(Class.java:43)
>         at ArrayForName.loadByName(ArrayForName.java:159)
>         at ArrayForName.expect(ArrayForName.java:145)
>         at ArrayForName.testLoadArray(ArrayForName.java:75)
>         at ArrayForName.main(ArrayForName.java:195)

Yeah, was my fault, I didn't "catch" the VerifyError
and "throw" a ClassNotFoundException instead. Also,
please see my other mail.

Greetings,
Helmer