This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: define-class and define-simple-class don't work in the latest versions


Per Bothner wrote:

> The main problem is define-class and define-simple-class really only
> work for compiled files.  If you use them on the command line or in a
> file you load you get into problems with the definition of a class
> creating a class in one Java class loader, and then code that uses the
> class trying to look for it in another class loader, usually the system
> class loader.  I think these problems can be solved by re-using class
> loaders more, but I haven't tried to work out the details.  (One issue
> is that if we re-use class loaders, then we risk thatt temporary classes
> will not get garbage collected.)

Understood. I based my assumptions on the first release of this feature,
where it worked as described. The docs should mention the restriction,
accordingly.

> Another potential problem is that the names 'test-one' and 'test-two'
> are not valid Java class names, so they need to be "mangled".  Kawa
> should do this automatically, but it is an issue to be aware of.

Same as above. The examples in the docs are '2d-vector' and '3d-vector'.

Thanks for your reply. I'll dig into the class loader docs myself. I seem to
recall there's a fix or workaround to the garbage collection issue in the
latest versions of the JVM (1.3 and higher). I really think dynamic class
definition is a plus, if not a requirement for everybody.

Cheers,

Willy Heineman





LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]