Is there a way to execute a java script from within a java program in a step-by-step manner?
I know how to call javascript from java. I know about Rhino or Beanshell. No web server involved.
What I'm trying to achieve: Have multiple scripts execute semi concurrently scheduled by a scheduler where each script gets a 'tick' every now and then in which it executes one atomic command just like in a debugger. This should also 'step into' functions and for/while loops.
I need to call the script 'tick' at a specific time (and return immediately) so real threads are no use.
So I guess i want a way to debug a script from within a java program without a debugger (and its overhead) involved. Just stepwise execution is needed.
Any ideas?