| java.lang.Object org.mozilla.javascript.tools.shell.Main
Main | public class Main (Code) | | The shell program.
Can execute scripts interactively or in batch mode at the command line.
An example of controlling the JavaScript engine.
author: Norris Boyd |
Method Summary | |
public static Object | evaluateScript(Script script, Context cx, Scriptable scope) | public static int | exec(String origArgs) Execute the given arguments, but don't System.exit at the end. | public static PrintStream | getErr() | public static Global | getGlobal() | public static InputStream | getIn() | public static PrintStream | getOut() | public static Script | loadScriptFromSource(Context cx, String scriptSource, String path, int lineno, Object securityDomain) | public static void | main(String args) Main entry point.
Process arguments as would a normal Java program. | public static void | processFile(Context cx, Scriptable scope, String filename) | static void | processFileSecure(Context cx, Scriptable scope, String path, Object securityDomain) | static void | processFiles(Context cx, String[] args) | public static String[] | processOptions(String args) Parse arguments. | public static void | processSource(Context cx, String filename) Evaluate JavaScript source. | public static void | setErr(PrintStream err) | public static void | setIn(InputStream in) | public static void | setOut(PrintStream out) |
exitCode | protected static int exitCode(Code) | | |
processStdin | static boolean processStdin(Code) | | |
exec | public static int exec(String origArgs)(Code) | | Execute the given arguments, but don't System.exit at the end.
|
main | public static void main(String args)(Code) | | Main entry point.
Process arguments as would a normal Java program. Also
create a new Context and associate it with the current thread.
Then set up the execution environment and begin to
execute scripts.
|
processSource | public static void processSource(Context cx, String filename)(Code) | | Evaluate JavaScript source.
Parameters: cx - the current context Parameters: filename - the name of the file to compile, or nullfor interactive mode. |
|
|