Kawa (Scheme implementation)


Kawa is a language framework written in the programming language Java that implements the programming language Scheme, a dialect of Lisp, and can be used to implement other languages to run on the Java virtual machine. It is a part of the GNU Project.
The name Kawa comes from the Polish word for coffee; a play on words, since Java is another familiar name for coffee.

Integration with Java

Besides using the language Scheme, Java object fields and methods can be accessed using code such as:. This will invoke a Java method, and does the same thing as in Java. An object's fields can be accessed with: or. Static methods can be invoked with the function. Kawa can be extended with Java code, and combined with other JVM implementations.

How to use

Kawa can be run normally via the kawa script:

$ kawa ...

Alternatively, Kawa can be run by hand:

$ java -jar /path/to/kawa/kawa.jar ...

To compile a Scheme file to a class file, the parameter is used:

$ java kawa.repl --main -C file.scm

This will produce file.class, which can be run by typing java file. It is also possible to create an applet or servlet.