kawa.repl on Android
Helmut Eller
eller.helmut@gmail.com
Sat Jul 14 15:39:00 GMT 2012
Here is a way to run Kawa on Android without creating a GUI app:
1. shell> configure --with-android
2. shell> make
3. shell> dx --dex --output=k.dex kawa-1.12.1.jar
4. shell> adb shell mkdir -p /mnt/sdcard/data/kawa/
5. shell> adb push k.dex /mnt/sdcard/data/kawa/
6. shell> adb shell
7. adb> cd /mnt/sdcard/data/kawa/
8. adb> export ANDROID_DATA=/mnt/sdcard/data/kawa/
9. adb> dalvikvm -cp k.dex kawa.repl -s
Essentially we convert the Kawa jar to a dex file, copy it to the
device, and use dalvikvm to execute it.
The dx and adb tools are part of the Android SDK and are in
$(ANDROID_SDK)/platform-tools. Step 8 tells dalvikvm where to put its
cache directory.
The error output stream on Android seems to be buffered, so
(force-output (current-error-port)) may be useful sometimes.
Helmut
More information about the Kawa
mailing list