Not sure how useful this is yet, but I have a proof of concept java app running through jscheme on my kindle 3g
howto (short):
1. download jscheme.jar and copy to kindle
2. run java -cp jscheme.jar jscheme.REPL on a root shell
3. paste in the proof of concept scheme code
howto (long):
1. download java 1.4 sdk
2. download jscheme
3. modify EventFrame.java (see attached)
4. run bin\make in jscheme
5. copy jscheme to device
PREREQS:
1. jail break
2. usbnetwork
WHY:
I wanted to be able to develop a simple app/script on the kindle. Scheme seemed like a good choice.
ISSUES:
I can't figure out how to keep the key code from bubbling up to the main window manager. It captures the keys but the main window (behind it) still gets its. For example, if I type abc then the search box still intercepts it too. Any ideas how to prevent that?
SCHEME CODE:
Code:
(import "java.awt.*")
(import "jlib.*")
(define *y* 0)
(define win (EventFrame. "Hello"))
(define font (Font. "Arial" 1 20))
(.paintHandler$ win (lambda(g)
(.setColor g Color.white$)
(.fillRect g 0 0 600 800)
(.setColor g Color.black$)
(.setFont win font)
(.drawString g (.toString *y*) 10 *y*)
(.drawOval g 40 50 100 100)
))
(.addKeyListener win
(Listener11. (lambda (e)
(set! *y* (+ 10 *y*))
(.consume e)
(.setKeyCode e 0)
(.println System.out$ e)
(.requestFocus win)
(.repaint win))))
(.pack win)
(.setSize win 600 800)
(.setFocusableWindowState win #t)
(.requestFocus win)
(.show win)