Thanks for the reply Dave.  That is what I am finding as well.  I
found a Continuation class in the JDK classes -
(sun.org.mozilla.javascript.internal.continuations.Continuation)
although I have not had much luck implementing it.  The JDK classes do
not appear to have the ContinuationPending class which appears to be
critical in the all of the Rhino examples when I run them.

Now with the JDK classes it is very straight forward to execute a file
containing JavaScript (or a string for that matter) but with the Rhino
classes I can not find any examples showing how to do this.

For example in JDK classes:

ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
engine.eval("var a=10;" +
        "var b=5;" +
        "var c=a+b;" +
        "println(c);");

// Will print 15 to the Java console when ran

How would the above code be written using the Rhino classes?
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to