On May 7, 5:57 am, Norris Boyd <[EMAIL PROTECTED]> wrote:
> On May 6, 5:15 pm, eonnen <[EMAIL PROTECTED]> wrote:
>
> > Apologies if this is an obvious question but I've not found an answer
> > from a decent bit of searching. Is it possible to start the
> > interactive shell such that it executes a script passed from the
> > command-line but remains an interactive environment (rather than
> > executing the script and simply exiting). I've tried -f which appears
> > to start my script, but immediately exists. I'd like to pre-wire my
> > environment via a wrapper script rather than explicitly loading a .js
> > file.
>
> Yes, a filename of "-" means interactive:
>
> [rhino] cat startup.js
> print("In startup.js...");
> var global = "My global varaible";
> [rhino] java -jar build//rhino1_7R2pre/js.jar -f startup.js -f -
> In startup.js...
> Rhino 1.7 release 2 PRERELEASE 2008 05 06
> js> global
> My global varaible
> js> quit()
> [rhino]

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

Reply via email to