Nolan Darilek wrote:
> I'm trying to make my app scriptable. Specifically, I need to expose a
> few Java APIs and make callbacks settable via user-written scripts.
> Ideally I'd like to hide some of the complexity away in a DSL, but
> there's no way of accomplishing what I want neatly without some form
> of user scripting, so I may accept another alternative if it meets my
> requirements.
> 
> Initially I looked into Scala as that is my main language of choice,
> but the Scala interpreter is just a wrapper around its compiler, which
> I'm told won't run well if at all on the phone.
> 
> I've also tried JRuby, which worked under Cupcake. There appears to be
> a regression in the form of a Dalvik bug that prevents it from working
> under Donut, however:
> 
> http://code.google.com/p/android/issues/detail?id=4242
> 
> Has anyone gotten anything working?

Beanshell works if the intepreter source code is recompiled with a
modern compiler (the downloads on beanshell.org are built with Java 1.4.2).

Rhino should work if you turn off all optimizations it attempts to do.
Leastways, I had a version from ~9 months ago working.

I would expect any scripting language that does not generate JVM
bytecodes to have a decent shot of working on Android, such as Sleep
(http://sleep.dashnine.org/) and Jacl
(http://tcljava.sourceforge.net/docs/website/index.html).

> I've also seen the Android Scripting Environment. Am I correct in
> assuming that this only supports running full interpreters and not
> embedding scripting languages into apps?

I do not believe ASE is designed with your scenario in mind.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to