Debian Codegraph @

rhino/debian/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
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
20 rhino \- invokes the JavaScript shell for running scripts in batch mode or interactive
21
22 .SH SYNOPSIS
23
24 .B rhino
25 .I [options]
26 .I script_filename_or_url
27 .I [script_arguments]
28
29 .SH DESCRIPTION
30
31 This manual page documents briefly the
32 .B rhino
33 command.
34 This manual page was written for the Debian distribution because the original
35 program does not have a manual page. It is written according to the html documentation.
36 .PP
37 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
38 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
39 .\" respectively.
40 \fBrhino\fP is a start script for the rhino JavaScript shell which provides a simple way
41 to run scripts in batch mode or an interactive environment for exploratory programming.
42
43 .SH OPTIONS
44
45 .IP -w
46 Enable warnings.
47 .IP -version\ \fIversionNumber\fP
48 Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, 140, 150, 160, 170, 180 or 200. See JavaScript Language Versions for more information on language versions.
49 .IP -opt,\ -O\ \fIoptLevel\fP
50 Optimizes at level optLevel, which must be an integer between -1 and 9. -1 means Interpretive mode is always used. 0 means no optimizations whereas 9 means all optimizations are performed.
51 .IP -f\ \fIscript_filename_or_url\fP
52 Reads script_filename_or_url content and execute it as a JavaScript script.
53 .IP -e\ \fIscript_source\fP
54 Executes script_source as a JavaScript script.
55 .IP -modules\ \fIuri\fP
56 Add a single path or URL element to the CommonJS module search path. (implies -require)
57 .IP -require
58 Enable CommonJS module support.
59 .IP -sandbox
60 Enable CommonJS sandbox mode. (implies -require)
61 .IP -debug
62 Generate debug code.
63 .IP -strict
64 Enable strict mode.
65 .IP -fatal-warnings
66 Treat warnings as errors.
67 .IP -encoding\ \fIcharset\fP
68 Use specified character encoding as default when reading scripts.
69
70 .SH PREDEFINED PROPERTIES
71
72 Scripts executing in the shell have access to some additional properties of the top-level object.
73
74 .IP arguments
75 The arguments object is an array containing the strings of all the arguments given at the command line when the shell was invoked.
76 .IP help()
77 Executing the help function will print usage and help messages.
78 .IP defineClass(\fIclassName\fP)
79 Define an extension using the Java class named with the string argument className. Uses ScriptableObject.defineClass() to define the extension.
80 .IP deserialize(\fIfilename\fP)
81 Restore from the specified file an object previously written by a call to serialize.
82 .IP load(\fI[filename,\&.\&.\&.]\fP)
83 Load JavaScript source files named by string arguments. If multiple arguments are given, each file is read in and executed in turn.
84 .IP loadClass(\fIclassName\fP)
85 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.
86 .IP print(\fI[expr\&.\&.\&.]\fP)
87 Evaluate and print expressions. Evaluates each expression, converts the result to a string, and prints it.
88 .IP readFile(\fIpath[,characterCoding]\fP)
89 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.
90 .IP readUrl(\fIurl[,characterCoding]\fP)
91 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.
92 .IP runCommand(\fIcommandName,[arg,\&.\&.\&.][options]\fP)
93 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.
94 .IP serialize(\fIobject,filename\fP)
95 Serialize the given object to the specified file.
96 .IP spawn(\fIfunctionOrScript\fP)
97 Run the given function or script in a different thread.
98 .IP sync(\fIfunction\fP)
99 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.
100 .IP quit()
101 Quit shell. The shell will also quit in interactive mode if an end-of-file character is typed at the prompt.
102 .IP version(\fI[number]\fP)
103 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.
104
105 .SH SEE ALSO
106
107 The online documentation under https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Shell
108
109 .SH AUTHOR
110
111 This manual page was written by Wolfgang Baer <[email protected]>,
112 for the Debian project (but may be used by others).