Published: Sun 14 September 2008
One of the many limitations of J2ME is the lack of dynamic code addition on runtime. It is impossible to add new classes, be it by class files or by reflection. The required APIs are just not included in CLDC. Given this limitation I find it surprising there are not many J2ME hosted script interpreters, specially now that medium and high end handsets have
megabytes of available heap memory and fast JIT compilers. Here are the ones I can find.
FScript, a very simple scripting language, has a J2ME port called FScriptME.
Hecl is a full blown scripting environment for J2ME. It has specific support for J2ME APIs and includes easy to use wrappers for many of them.
Simple Forth Interpreter has a J2ME port. Forth is a very good fit for the limited resources you find in J2ME handsets but its reverse polish notation and stack-based, hum, everything, are usually very off-putting to programmers.
An extremely simple J2ME
Lisp interpreter as an OKI software programming exercise. I'm not kidding, run it and see it for yourself. It lacks proper lambda expressions so it's not useful for anything other than as a demonstration, but it could be used as the base of a more complete interpreter (which is what part of the exercise appears to be).
JScheme is small enough to be ported to J2ME, specifically the old 1.x versions which have less bootstrapping implemented in pure Scheme (which allows for a smaller JAR file.) In fact somebody as already ported it to J2ME.
Proudly powered by
Pelican, which takes great advantage of Python.
The theme is by
Smashing Magazine, thanks!