This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: define-class and define-simple-class don't work in the latest versions
- From: Per Bothner <per at bothner dot com>
- To: "Heineman, William P" <william_p_heineman at groton dot pfizer dot com>
- Cc: "'kawa at sources dot redhat dot com'" <kawa at sources dot redhat dot com>
- Date: Wed, 02 Jan 2002 10:50:37 -0800
- Subject: Re: define-class and define-simple-class don't work in the latest versions
- References: <E9DA3AB7D3FD27419EF734CC94935E24130C25@groexmbcr13.pfizer.com>
Heineman, William P wrote:
> (define-simple-class <test-one> ())
>
> followed by:
>
> (define-simple-class <test-two> (<test-one>))
>
> and you get the same error. Substituting define-class for
> define-simple-class in the above examples will also yield the same result.
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.)
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.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/