Is there a way to execute a java script from a java program in stages?
I know how to call javascript from java. I know about Rhino or Beanshell. There is no web server.
What I'm trying to achieve: Several scripts are executed by a semi-command scheduled scheduler, where each script receives a "tick" each time, and then when it executes one atomic command, as in a debugger. This should also βenterβ into functions for / while loops.
I need to call the script 'tick' at a specific time (and return immediately), so real threads are useless.
So, I think I need a way to debug a script from a java program without using a debugger (and its overhead). It just takes a step-by-step execution.
Any ideas?
source share