This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
RE: importing java packages
- From: "Dominique Boucher" <dominique dot boucher at nuecho dot com>
- To: "'Per Bothner'" <per at bothner dot com>, <kawa at sources dot redhat dot com>
- Date: Thu, 17 Mar 2005 15:34:07 -0500
- Subject: RE: importing java packages
- Reply-to: <dominique dot boucher at nuecho dot com>
> > For example, not all class files are immediately written to
> disk. Kawa
> > resorts to registerShutdownHook to ensure that all ports
> are closed.
> > This means that sometimes you compile a file A to a .class,
> then you
> > try to compile B, which depends on A.
> > But the compilation
> > of B will fail since A.class has not been written yet, or
> it sees an
> > older version of A.class.
>
> Huh? A .class file is written using the writeToFile method
> in ClassType.
> This closes the stream as soon it is written.
That was certainly a bad interpretation from my part, and the problem (*)
lies elsewhere.
(I admit that I have not spent a lot of time figuring out what was going
on.)
Maybe Kawa does not read the new class file and keeps the old one.
In any case, I have to restart my process to make the new B.class visible
to
Kawa.
Now I recall that the Type class maintains a table of all known types. So
can the problem
be that the table is not reinitialized between each compilation series?
(*) Well, it's not a problem with Kawa per se. But for what I'm trying to
do, Kawa does not
behave as I'd like.
Dominique