kaffe javac question: forward reference supported?
ejb at klomp.org
Wed Apr 11 02:14:08 PDT 2001
On Wed, 11 Apr 2001, Mark Wielaard wrote:
> On Tue, Apr 10, 2001 at 07:02:38PM -0700, Yong Chen wrote:
> > Hi,
> > thank you very much for the reply, it did help me to some extent. But
> > unfortunately I'm still facing a problem which is related to my previous
> > question. I tried to compile 2 classes (each references the other) at same
> > time (like: kjc A.java B.java) but got exception (see below). This happens
> > when these 2 classes are in same package, also happens when these 2 classes
> > are in different packages.
> > Any help is appreciated.
> It looks like a bug in kjc. You might be interested in KopiSusu a compiler
> based on kjc that has a lot of bug fixes. Your problem might also be fixed
> in that release. <http://www.klomp.org/KopiSusu/> If the bug is still in
> that release then it is likely to be fixed quickly. The maintainer is very
> eager to make it the most bug free, JLS compliant compiler for the Java
Yes, it keeps you of the street. KopiSusu 1.9b4 does implement references
to classes that are not on the command line. In that case, it tries to
load the source file from the class-path.
So, "ksusu -classpath . A.java" would also load B.java if A.java refers to
About the problem that you still have when both A.java and B.java are
given on the command line, you would need to post some source code. From
the stack trace, it doesn't look like a class lookup problem, but
something else. I don't think KopiSusu will give the same exception, for
the simple reason that in the method that generated the ClassCastException
in your stack trace, KopiSusu first checks with 'instanceof'.
More information about the kaffe