[ home | photos | gallery | scheme | notes | interests | blog | youtube | last.fm | facebook | myspace | del.icio.us ]
Per Bothner's Kawa Scheme: a Scheme interpreter written in the Java with bindings to the Java language. The system allows compilation of Scheme code directly to Java Bytecodes. Since Mac OS X is essentially a Unix-like system, this document will not duplicate the instructions in the Kawa Manual.
All versions listed are current of this sections's last revision on 11/28/2003.
To see a listing of all the flags available at configure, type ./configure --help | less at the prompt. If you are using the binary distribution see the instructions Installing and using the binary distribution. The Kawa Manual sections Building and installing Kawa contains full instructions. Here are some examples:
./configure --with-swing # base kawa with swing, recommended and needed for GUI use ./configure --with-swing --with-java-collections # another example, type ./configure --help to see a full list of configure options ./configure --prefix=/Users/Shared --with-swing --with-java-collections --enable-xml --enable-servlet # includes servlet supports see Including Servlet Support for information. Prefix is for alternate installation paths.
Type make at the prompt to make.
If you are using the binary distribution see the instructions Installing and using the binary distribution. After make finishes, it is strongly recommended that you run the testsuite (cd testsuite; make check). Kawa uses an elegant installation scheme in the /usr/local/ path. You must be root or a 'sudoer' to evoke make install, if this is not feasible (ie. user account), then use the Installing and using the binary distribution instructions, substituting the appropriate kawa-x.x.xx.jar file name from the kawa build directory into the CLASSPATH. Another work around is to use alternate installation paths, and supply the correct path for --prefix at configure.
See the instructions How to start up and run Kawa. Mac OS X 10.3 and later include both Java 1.3.1 and 1.4.1, the later being the default and preferred. You can change this if necessary, type java -help at the prompt for information.
Kawa can take a wide variety of command line flags. Here are two quick examples (with kawa default installation in /usr/local/):
rds% kawa -e "(display (scheme-implementation-version))(newline)" 1.7.90 # print kawa version on the terminal rds% kawa -w & # Running a Command Interpreter in a new Window
JAVAOPTS, but I call it directly. Here is an example session with the local paths I use with an example of calling native Apple classes.
rds% java -XX:+UseTLE -jar /Users/Shared/share/java/kawa.jar --full-tailcalls #|kawa:1|# (define-namespace afm "class:com.apple.eio.FileManager") #|kawa:2|# (afm:openURL "http://www.apple.com") ; opens URI in default W3 client #|kawa:3|# (exit)
Jar Bundler comes with the Mac OS X 10.2 and later Developer Tools is well documented in both its online help and Apple's site. It is useful for creating stand alone application versions of Kawa.
Emacs provides another way to interact with Kawa under Unix-like systems. This is documented at Running Kawa Scheme under Emacs.