Rhino
Links
Download
Download rhino1_6R7.zip
from http://www.mozilla.org/rhino/download.html
Extract the archive to a convenient folder. I extracted to:
C:\tools\rhino1_6R7\
Usage
To start the interactive shell:
java -cp /tools/rhino1_6R7/js.jar org.mozilla.javascript.tools.shell.Main
Script
To run a script, just append the name of the script to the previous command e.g. to run this script:
function name(first, last)
{
return first + " " + last;
}
print(name("Patrick", "Kimber"));
…which is saved as script.js
:
java -cp /tools/rhino1_6R7/js.jar org.mozilla.javascript.tools.shell.Main script.js