Reputation: 186
I need to invoke Lua/Python Scripts from a String or a File with the possibility to bind Java objects, so I can use them directly inside the script.
Something like:
e.bind("varname", object);
e.call("object.toString()");
Unfortunately Jython, which is perfect for my purposes, does not work on the dalvik vm.
I also tried kahlua, but it seems that I can´t bind objects to scripts there.
Upvotes: 2
Views: 659
Reputation: 186
I finally found a scripting language, which also fits my purposes well.
It is called BeanShell and itself is as simple as it could be. Almost like Java.
Just checkout the official site:
BeanShell
It is not longer developed by the orinigal programmer, but an active project on google-code called beanshell2 is the follower of BeanShell.
You can find it here: BeanShell2
Upvotes: 0
Reputation: 1006684
Assuming SL4A does not meet your needs, you will need to turn Python into a library (Lua already is one) and attach it your your application via the NDK.
And, as neither Lua nor Python know anything about Java, so you will have to write the glue code to connect your Java objects up to the Lua and Python scripts. I am guessing that this is possible, but that is just a guess.
This work will not be trivial, in all likelihood.
Upvotes: 1