Is there any framework for this?
Java includes a scripting language extension package starting with version 6.
Here is a small example of how you can expose Java objects to your interpreted script:
You can use ScriptEngine, example:
Have a look at Rhino: http://www.mozilla.org/rhino/
The Oracle blog for Nashorn contains news as well as source code samples.
Rhino is what you are looking for.
I just wanted to answer something new for this question -
Neither support ‘Primitives‘. All interactions with these platforms require wrapper classes such as Integer, Double or Boolean. Nashorn is not supported on Android. Rhino compiler optimizations are not supported on Android. Neither engines support remote debugging on Android.""
©2020 All rights reserved.