This is the mail archive of the kawa@sourceware.org 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]

"Image-based development" with Kawa


I am currently building "Katakana", a "rapid application development"
environment for statistical analysis and computational intelligence on
top of Kawa 1.8 (stable).

While my results are really encouraging so far, I would like to support
a more dynamic, "image-based" or "Smalltalk-like" development style that
does not rely on an "edit-compile-run-cycle". I'm using XStream
(xstream.codehaus.org) to serialize objects in the scheme environment
and later de-serialize them, which works beautifully except for class
types:

(define-simple-class <my-class> [...])
(serialize-to-file <my-class> "MyClass.img")

(define <my-class> (de-serialize-from-file "MyClass.img"))
(make <my-class>) -> Throws an NoSuchClass exception, naturally

My plan is to use (*:write-to-stream <my-class> [...]) to create the
byte-code for <my-class> so I can bundle it with my ".img" file and
point the class loader to it when <my-class> is de-serialized again. My
problem is that I do not understand the mechanics of the Kawa compiler
yet, specifically when and why a class defined via "define-simple-class"
or "define-class" gets compiled to bytecode. I found out that a class so
defined seems to be compiled on first use, but the class loader fails to
load the bytecode generated via (*:write-to-stream <my-class> ...) with
the following Exception:

java.lang.ClassFormatError: Absent Code attribute in method that is not
native or abstract in class file

I would be glad if someone on this list could help my with this problem.
As you have probably already guessed, I am fairly new to Kawa.


Thank you in advance,

Oliver


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