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: importing java packages


> How about this alternate feature:
> 
>     (define-package-namespaces <java.awt>)
> 
> which would create (define-namespace JFrame <java.awt.JFrame>) etc.

Nice. But is it possible? Can you access all classes of a given package in
Java, 
without scanning directories/Jar files manually? I may be mistaken, but the
standard java.lang.Package class does not provide any introspection
methods...

> What I really would like is if Kawa provided me the tools so 
> I could write this feature in Scheme myself with access to 
> the compiler source code.

Apart from the class loading problems, I think a macro would do a decent job
in
this case.

But I would also like a simple and clean API  (Scheme or Java, I don't mind)
for compiling Scheme 
files to .class files. This would make integrating the compiler in IDEs like
Eclipse easier. There are 
a number of problems with the way Kawa compiles multiple files (at least for
doing what I have in mind). 

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.

Or did I miss something?

Dominique



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