On Wed, Oct 28, 2009 at 3:47 PM, Eric Lee <[email protected]> wrote: > Hi, > > I think I am in the same boat as aschearer. I am just beginning at looking > at embeddable scripting languages. I see that it is possible to create New > java objects through Rhino and work with these objects. But is it possible > for Rhino script to interact with an existing running Java application? >
Sure. I don't have any experience with the shell, but I think the idea is the same: when you run a script in a "context" (or is it "scope"?) you decide what to expose to the script. So you can expose the method jFunction or you can add a property that is "the application" and just call whatever public methods it has. What I do is add "extension points" to my app where at various points I run a script designed to extend the logic at that point and pass in parameters to the function and have it modify the parameters, return new data, etc. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:[email protected] _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
