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


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/


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