Debian Codegraph @

rhino/man/rhino.1

raw
1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH RHINO 1 "February 12, 2005"
6 .\" Please adjust this date whenever revising the manpage.
7 .\"
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
18 .SH NAME
19 rhino \- invokes the JavaScript shell for running scripts in batch mode or interactive
20
21 .SH SYNOPSIS
22 .B rhino
23 .I [options]
24 .I script_filename_or_url
25 .I [script_arguments]
26
27 .SH DESCRIPTION
28 This manual page documents briefly the
29 .B rhino
30 command.
31 .PP
32 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
33 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
34 .\" respectively.
35 \fBrhino\fP is a start script for the rhino JavaScript shell which provides a simple way
36 to run scripts in batch mode or an interactive environment for exploratory programming.
37
38 .SH OPTIONS
39
40 .IP -e\ \fIscript_source\fP
41 Executes script_source as a JavaScript script.
42 .IP -f\ \fIscript_filename_or_url\fP
43 Reads script_filename_or_url content and execute it as a JavaScript script.
44 .IP -opt,\ -O\ \fIoptLevel\fP
45 Optimizes at level optLevel, which must be an integer between 0 and 9.
46 .IP -version\ \fIversionNumber\fP
47 Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, or 140. See JavaScript Language Versions for more information on language versions.
48
49 .SH PREDEFINED PROPERTIES
50
51 Scripts executing in the shell have access to some additional properties of the top-level object.
52
53 .IP arguments
54 The arguments object is an array containing the strings of all the arguments given at the command line when the shell was invoked.
55 .IP help()
56 Executing the help function will print usage and help messages.
57 .IP defineClass(\fIclassName\fP)
58 Define an extension using the Java class named with the string argument className. Uses ScriptableObject.defineClass() to define the extension.
59 .IP deserialize(\fIfilename\fP)
60 Restore from the specified file an object previously written by a call to serialize.
61 .IP load(\fI[filename,\&.\&.\&.]\fP)
62 Load JavaScript source files named by string arguments. If multiple arguments are given, each file is read in and executed in turn.
63 .IP loadClass(\fIclassName\fP)
64 Load and execute the class named by the string argument className. The class must be a class that implements the Script interface, as will any script compiled by jsc.
65 .IP print(\fI[expr\&.\&.\&.]\fP)
66 Evaluate and print expressions. Evaluates each expression, converts the result to a string, and prints it.
67 .IP readFile(\fIpath[,characterCoding]\fP)
68 Read given file and convert its bytes to a string using the specified character coding or default character coding if explicit coding argument is not given.
69 .IP readUrl(\fIurl[,characterCoding]\fP)
70 Open an input connection to the given string url, read all its bytes and convert them to a string using the specified character coding or default character coding if explicit coding argument is not given.
71 .IP runCommand(\fIcommandName,[arg,\&.\&.\&.][options]\fP)
72 Execute the specified command with the given argument and options as a separate process and return the exit status of the process. For details, see JavaDoc for org.mozilla.javascript.tools.shell.Global#runCommand.
73 .IP serialize(\fIobject,filename\fP)
74 Serialize the given object to the specified file.
75 .IP spawn(\fIfunctionOrScript\fP)
76 Run the given function or script in a different thread.
77 .IP sync(\fIfunction\fP)
78 creates a synchronized function (in the sense of a Java synchronized method) from an existing function. The new function synchronizes on the this object of its invocation.
79 .IP quit()
80 Quit shell. The shell will also quit in interactive mode if an end-of-file character is typed at the prompt.
81 .IP version(\fI[number]\fP)
82 Get or set JavaScript version number. If no argument is supplied, the current version number is returned. If an argument is supplied, it is expected to be one of 100, 110, 120, 130, or 140 to indicate JavaScript version 1.0, 1.1, 1.2, 1.3, or 1.4 respectively.
83
84 .SH SEE ALSO
85 The online documentation under
86 .UR http://www.mozilla.org/rhino/shell.html
87 .I http://www.mozilla.org/rhino/shell.html
88 .UE
89
90 .SH AUTHOR
91 This manual page was written by Wolfgang Baer <[email protected]>.