large Class.forName() patch

Jason Baker jbaker at
Sat Jan 29 12:30:07 PST 2000

> Hi all.
> I have been working on getting Class.forName() working more like
> the Sun JDK and I have a patch that I would like to get some comments
> on. I have attached a file called which tests
> the Class.forName() method and compares the result to an expected
> result. First, try running this test case on the current CVS version
> of Kaffe to see how many failures you get. Then apply the patch
> called forname.patch and check out how many problems it fixes.
> I feel good about almost all of the changes in the patch, except
> for the first on (the one in file classMethod.c around line 1035).
> I am not sure if this would break JNI code, or if was just the wrong
> place to make the change. Could someone who knows more about the
> internals check it out and suggest a better change if there is one?

Wow, I had no idea that forName accepted some of the things you found.
I hava noticed that it accepts [Ljava/lang/Object; as well as
[Ljava.lang.Object; It doesn't look like you changed this, which is
probably just as well.  As for primitive types, I suspect that keeping
them in the classpool is a bug in the first place.  Why shouldn't a
JVM accept a class who's name is a Java Language keyword?


More information about the kaffe mailing list