gcj/260: "Klass.class" expression should cause Klass to be initialized
Jeff Sturm
jsturm@sigma6.com
Sun Jun 18 17:00:00 GMT 2000
The following reply was made to PR gcj/260; it has been noted by GNATS.
From: Jeff Sturm <jsturm@sigma6.com>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: tromey@cygnus.com, apbianco@cygnus.com, java-gnats@sourceware.cygnus.com
Subject: Re: gcj/260: "Klass.class" expression should cause Klass to be
initialized
Date: Sun, 18 Jun 2000 19:48:22 -0400
Bryce McKinlay wrote:
> I was actually thinking of the JDK 1.2/1.3 html docs, where it says:
>
> "A call to forName("X") causes the class named X to be initialized."
Thanks. Tom pointed out the same. I'd bet Sun added that line after
all the confusion with JDBC driver initialization prior to 1.2.
> > Now, the PR also says "gij ClassInit" fails the test. It turns out that
> > libgcj's Class.forName() fails to perform initialization as well. So
> > the runtime must be patched along with gcj.
>
> Oops, your right. I don't know how I didnt notice this before! But I see Tom
> has checked in a fix for that already. gcj still needs to be fixed as well of
> course, as ".class" is implemented differently.
Right. A more direct mechanism is used, but only when compiling source
to native code.
--
Jeff Sturm
jeff.sturm@appnet.com
More information about the Java-prs
mailing list