I am looking for any scripting language that is not LUA and works on Desktop, Android and iOS without any native libraries. Preferably JavaScript with ES6. I couldn’t find any links on how many features does Multi OS support from the JVM, and I don’t have means to test it atm.
MOE is using our enhanced version of Android ART. MOE 1.3 uses a version from Android 6, MOE 2.x is based on Android 7. This means, any standard Java code (using java., javax.), that works on Android, should work on MOE as well.
I don’t know if the ScriptEngine API is supported on Android. Theoretically it should work, as long as the ScriptEngine implementation does not use unsupported features, like invokeDynamic.
Thanks @pkirill for sharing your experience with Rhino on MOE, good to know, that it works fine.
It seems that javax.script.ScriptEngineManager is not supported on Android 4.4.2. What I ended up using is Rhino, which is actually written in pure Java to my surprise. To make it work on older androids, I disabled optimizations by setting them to -1 as they make Rhino use features which DalvikVM didn’t support apparently. Hopefully I will even have ES7 working in the future.
Dear Kisg,
“MOE is using our enhanced version of Android ART. MOE 1.3 uses a version from Android 6, MOE 2.x is based on Android 7. This means, any standard Java code (using java., javax.), that works on Android, should work on MOE as well.”
Do you mean that MOE implenments the complete jre on android 6? My means is that like NIO, or any other non-android specific code are all implenments on MOE (nio on iOS)? if then, it is great to reuse android app code.
Thanks!