I don't personally play with the shell, but I don't expect you would have
too much of a problem extending it to add your own Javascript methods. Take
a look at the embedding tutorial to get an idea of how you can add your own
Javascript objects. In extending the shell I suspect you'll be doing
something like this.

http://www.mozilla.org/rhino/tutorial.html

Let me know if I'm off base with my thoughts here.

Dave


-----Original Message-----
From:
dev-tech-js-engine-rhino-bounces+davidparks21=yahoo....@lists.mozilla.org
[mailto:dev-tech-js-engine-rhino-bounces+davidparks21=yahoo....@lists.mozill
a.org] On Behalf Of aschearer
Sent: Sunday, October 25, 2009 12:51 PM
To: [email protected]
Subject: Calling Java CLI programs through Rhino

Hey, I've heard a number of things about this project before but only
recently dipped my toe in. So far I'm really pleased by what I'm
finding -- keep up the good work! One question I had, though, was
whether it is possible to blend Java CLI programs with Rhino's shell.
I would very much like to combine the scripting power provided by the
shell with the functionality present in programs I've written. In this
case, I am thinking a little of Microsoft's Powershell as a model. As
far as I can tell I am not able to simply invoke a program and pass
arguments. Is that correct? How could I go about adding that kind of
support -- maybe it's impossible since I suppose "program -f arg"
isn't exactly Javascript...

The dream scenario might work as follows. Write programs in Java to
perform CRUD operations, use Rhino shell to script using CLI programs
and data objects they create. Today I can get close to that by using
reflection and a launcher but this solution is fairly cumbersome.

Any help or insight would be appreciated, thanks!
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino



_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to