large Class.forName() patch

Mo DeJong mdejong at
Mon Jan 31 12:19:24 PST 2000

On Sun, 30 Jan 2000, Archie Cobbs wrote:

> Mo DeJong writes:
> > 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
> I don't understand this comment:
> +       /* This is kind of strange, but Sun's implementation
> +          does not allow lookups like Class.forName("int"),
> +          so if this is a primitive type, we just pretend
> +          it could not be found. It would be handy to load
> +          "int" or "char" by name, but oh well */

Well, then why does Kaffe allow lookups by name? I thought it might
be a handy feature but it is not something that is allowed in the
Sun JDK. My patch removed the ability to do lookups like
Class.forName("int") and Class.forName("void"), so that Kaffe
would act more like the Sun JDK. I think your "Quick Take" on
it was the same as mine, I just want to make sure that everyone
agrees that such a lookup should not be allowed and that the
patch I sent is the correct way to disallow them. If you like we
can change the "This is kind of strange, but" text to
"Testing shows that Sun's implementation ...".

Mo DeJong
Red Hat Inc.

> Why would a JVM be expected to recognize a Java language keyword?
> As far as the JVM is concerned, Java is just one of many higher
> level languages that are capable of being compiled to bytecode
> (or am I misreading something, this was just a quick take).
> -Archie
> ___________________________________________________________________________
> Archie Cobbs   *   Whistle Communications, Inc.  *

More information about the kaffe mailing list