1RHINO(1)                    General Commands Manual                   RHINO(1)
2
3
4

NAME

6       rhino  - invokes the JavaScript shell for running scripts in batch mode
7       or interactive
8
9

SYNOPSIS

11       rhino [options] script_filename_or_url [script_arguments]
12
13

DESCRIPTION

15       This manual page documents briefly the rhino command.
16
17       rhino is a start script for the rhino JavaScript shell which provides a
18       simple  way  to run scripts in batch mode or an interactive environment
19       for exploratory programming.
20
21

OPTIONS

23       -e script_source
24              Executes script_source as a JavaScript script.
25
26       -f script_filename_or_url
27              Reads  script_filename_or_url  content  and  execute  it  as   a
28              JavaScript script.
29
30       -opt, -O optLevel
31              Optimizes  at level optLevel, which must be an integer between 0
32              and 9.
33
34       -version versionNumber
35              Specifies the language version to compile with. The string  ver‐
36              sionNumber  must  be  one  of  100,  110,  120, 130, or 140. See
37              JavaScript Language Versions for more  information  on  language
38              versions.
39
40

PREDEFINED PROPERTIES

42       Scripts  executing  in the shell have access to some additional proper‐
43       ties of the top-level object.
44
45
46       arguments
47              The arguments object is an array containing the strings  of  all
48              the  arguments  given  at  the  command  line when the shell was
49              invoked.
50
51       help() Executing the help function will print usage and help messages.
52
53       defineClass(className)
54              Define an extension using the Java class named with  the  string
55              argument   className.   Uses  ScriptableObject.defineClass()  to
56              define the extension.
57
58       deserialize(filename)
59              Restore from the specified file an object previously written  by
60              a call to serialize.
61
62       load([filename,...])
63              Load  JavaScript source files named by string arguments. If mul‐
64              tiple arguments are given, each file is read in and executed  in
65              turn.
66
67       loadClass(className)
68              Load  and  execute the class named by the string argument class‐
69              Name. The class must be  a  class  that  implements  the  Script
70              interface, as will any script compiled by jsc.
71
72       print([expr...])
73              Evaluate  and print expressions. Evaluates each expression, con‐
74              verts the result to a string, and prints it.
75
76       readFile(path[,characterCoding])
77              Read given file and convert its bytes  to  a  string  using  the
78              specified  character  coding  or  default  character  coding  if
79              explicit coding argument is not given.
80
81       readUrl(url[,characterCoding])
82              Open an input connection to the given string url, read  all  its
83              bytes and convert them to a string using the specified character
84              coding or default character coding if explicit  coding  argument
85              is not given.
86
87       runCommand(commandName,[arg,...][options])
88              Execute  the  specified  command  with  the  given  argument and
89              options as a separate process and return the exit status of  the
90              process.       For       details,      see      JavaDoc      for
91              org.mozilla.javascript.tools.shell.Global#runCommand.
92
93       serialize(object,filename)
94              Serialize the given object to the specified file.
95
96       spawn(functionOrScript)
97              Run the given function or script in a different thread.
98
99       sync(function)
100              creates a synchronized function (in the sense of a Java synchro‐
101              nized  method)  from an existing function. The new function syn‐
102              chronizes on the this object of its invocation.
103
104       quit() Quit shell. The shell will also quit in interactive mode  if  an
105              end-of-file character is typed at the prompt.
106
107       version([number])
108              Get  or  set  JavaScript  version number. If no argument is sup‐
109              plied, the current version number is returned. If an argument is
110              supplied, it is expected to be one of 100, 110, 120, 130, or 140
111              to indicate JavaScript  version  1.0,  1.1,  1.2,  1.3,  or  1.4
112              respectively.
113
114

SEE ALSO

116       The  online documentation under http://www.mozilla.org/rhino/shell.html
117http://www.mozilla.org/rhino/shell.html
118
119

AUTHOR

121       This manual page was written by Wolfgang Baer <WBaer@gmx.de>.
122
123
124
125                              February  12, 2005                      RHINO(1)
Impressum