src/solaris/doc/sun/man/man1/jjs.1

Print this page

        

@@ -19,18 +19,21 @@
 .\"
 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 .\" or visit www.oracle.com if you need additional information or have any
 .\" questions.
 .\"
-.\"     Arch: generic
-.\"     Software: JDK 8
+.\" Title: jjs
+.\" Language: English
 .\"     Date: 03 March 2015
 .\"     SectDesc: Basic Tools
-.\"     Title: jjs.1
+.\" Software: JDK 8
+.\" Arch: generic
+.\" Part Number: E38207-04
+.\" Doc ID: JSSON
 .\"
 .if n .pl 99999
-.TH jjs 1 "03 March 2015" "JDK 8" "Basic Tools"
+.TH "jjs" "1" "03 March 2015" "JDK 8" "Basic Tools"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 .\" http://bugs.debian.org/507673

@@ -46,312 +49,200 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .\" -----------------------------------------------------------------
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
-
-.SH NAME    
+.SH "NAME"
 jjs \- Invokes the Nashorn engine\&.
-.SH SYNOPSIS    
+.SH "SYNOPSIS"
 .sp     
+.if n \{\
+.RS 4
+.\}
 .nf     
-\f3\fBjjs\fR [\fIoptions\fR] [\fIscript\-files\fR] [\-\- \fIarguments\fR]\fP
+\fB\fBjjs\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIscript\-files\fR\fR\fB] [\-\- \fR\fB\fIarguments\fR\fR\fB]\fR
 .fi     
-.sp     
-.TP     
+.if n \{\
+.RE
+.\}
+.PP
 \fIoptions\fR
-One or more options of the \f3jjs\fR command, separated by spaces\&. For more information, see Options\&.
-.TP     
-\fIscript-files\fR
+.RS 4
+One or more options of the
+\fBjjs\fR
+command, separated by spaces\&. For more information, see Options\&.
+.RE
+.PP
+\fIscript\-files\fR
+.RS 4
 One or more script files which you want to interpret using Nashorn, separated by spaces\&. If no files are specified, an interactive shell is started\&.
-.TP     
+.RE
+.PP
 \fIarguments\fR
-All values after the double hyphen marker (\f3--\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the \f3arguments\fR property (see )\&.
-.SH DESCRIPTION    
-The \f3jjs\fR command-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
-.SH OPTIONS    
-The options of the \f3jjs\fR command control the conditions under which scripts are interpreted by Nashorn\&.
-.TP
--ccs=\fIsize\fR , --class-cache-size=\fIsize\fR
+.RS 4
+All values after the double hyphen marker (\fB\-\-\fR) are passed through to the script or the interactive shell as arguments\&. These values can be accessed by using the
+\fBarguments\fR
+property (see Example 3)\&.
+.RE
+.SH "DESCRIPTION"
+.PP
+The
+\fBjjs\fR
+command\-line tool is used to invoke the Nashorn engine\&. You can use it to interpret one or several script files, or to run an interactive shell\&.
+.SH "OPTIONS"
+.PP
+The options of the
+\fBjjs\fR
+command control the conditions under which scripts are interpreted by Nashorn\&.
+.PP
+\-cp \fIpath\fR
 .br
-Sets the class cache size (in bytes)\&. Append the letter \f3k\fR or \f3K\fR to indicate kilobytes (KB), \f3m\fR or \f3M\fR to indicate megabytes (MB), \f3g\fR or \f3G\fR to indicate gigabytes (GB)\&. By default, the class cache size is set to 50 bytes\&. The following example shows how to set it to 1024 bytes (1 KB):
-.sp     
-.nf     
-\f3\-css=100\fP
-.fi     
-.nf     
-\f3\-css=1k\fP
-.fi     
-.nf     
-\f3\fP
-.fi     
-.sp     
-
-.TP
--co, --compile-only
-.br
-Compiles the script without running it\&.
-.TP
--cp \fIpath\fR , -classpath \fIpath\fR
-.br
+\-classpath \fIpath\fR
+.RS 4
 Specifies the path to the supporting class files To set multiple paths, the option can be repeated, or you can separate each path with a colon (:)\&.
-.TP
--D\fIname\fR=\fIvalue\fR
-.br
-Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign \f3myValue\fR to the property named \f3myKey\fR:
+.RE
+.PP
+\-D\fIname\fR=\fIvalue\fR
+.RS 4
+Sets a system property to be passed to the script by assigning a value to a property name\&. The following example shows how to invoke Nashorn in interactive mode and assign
+\fBmyValue\fR
+to the property named
+\fBmyKey\fR:
 .sp     
+.if n \{\
+.RS 4
+.\}
 .nf     
-\f3>> \fIjjs \-DmyKey=myValue\fR\fP
-.fi     
-.nf     
-\f3jjs> \fIjava\&.lang\&.System\&.getProperty("myKey")\fR\fP
-.fi     
-.nf     
-\f3myValue\fP
-.fi     
-.nf     
-\f3jjs>\fP
-.fi     
-.nf     
-\f3\fP
-.fi     
-.sp     
+\fB>> \fR\fB\fBjjs \-DmyKey=myValue\fR\fR
+\fBjjs> \fR\fB\fBjava\&.lang\&.System\&.getProperty("myKey")\fR\fR
+\fBmyValue\fR
+\fBjjs>\fR
 
-
+.fi
+.if n \{\
+.RE
+.\}
 This option can be repeated to set multiple properties\&.
-.TP
--d=\fIpath\fR , --dump-debug-dir=\fIpath\fR
+.RE
+.PP
+\-doe
 .br
-Specifies the path to the directory where class files are dumped\&.
-.TP
---debug-lines
-.br
-Generates a line number table in the class file\&. By default, this option is enabled\&. To disable it, specify \f3--debug-lines=false\fR\&.
-.TP
---debug-locals
-.br
-Generates a local variable table in the class file\&.
-.TP
--doe, --dump-on-error
-.br
+\-\-dump\-on\-error
+.RS 4
 Provides a full stack trace when an error occurs\&. By default, only a brief error message is printed\&.
-.TP
---early-lvalue-error
+.RE
+.PP
+\-fv
 .br
-Reports invalid lvalue expressions as early errors (that is, when the code is parsed)\&. By default, this option is enabled\&. To disable it, specify \f3--early-lvalue-error=false\fR\&. When disabled, invalid lvalue expressions will not be reported until the code is executed\&.
-.TP
---empty-statements
-.br
-Preserves empty statements in the Java abstract syntax tree\&.
-.TP
--fv, --fullversion
-.br
+\-\-fullversion
+.RS 4
 Prints the full Nashorn version string\&.
-.TP
---function-statement-error
-.br
-Prints an error message when a function declaration is used as a statement\&.
-.TP
---function-statement-warning
-.br
-Prints a warning message when a function declaration is used as a statement\&.
-.TP
--fx
-.br
+.RE
+.PP
+\-fx
+.RS 4
 Launches the script as a JavaFX application\&.
-.TP
--h, -help
+.RE
+.PP
+\-h
 .br
+\-help
+.RS 4
 Prints the list of options and their descriptions\&.
-.TP
--J\fIoption\fR
-.br
-Passes the specified \f3java\fR launcher option to the JVM\&. The following example shows how to invoke Nashorn in interactive mode and set the maximum memory used by the JVM to 4 GB:
-.sp     
-.nf     
-\f3>> \fIjjs \-J\-Xmx4g\fR\fP
-.fi     
-.nf     
-\f3jjs> \fIjava\&.lang\&.Runtime\&.getRuntime()\&.maxMemory()\fR\fP
-.fi     
-.nf     
-\f33817799680\fP
-.fi     
-.nf     
-\f3jjs>\fP
-.fi     
-.nf     
-\f3\fP
-.fi     
-.sp     
-
-
-This option can be repeated to pass multiple \f3java\fR command options\&.
-.TP
---language=[es5]
-.br
+.RE
+.PP
+\-\-language=[es5]
+.RS 4
 Specifies the ECMAScript language version\&. The default version is ES5\&.
-.TP
---lazy-compilation
+.RE
+.PP
+\-ot
 .br
-Enables lazy code generation strategies (that is, the entire script is not compiled at once)\&. This option is experimental\&.
-.TP
---loader-per-compile
-.br
-Creates a new class loader per compile\&. By default, this option is enabled\&. To disable it, specify \f3--loader-per-compile=false\fR\&.
-.TP
---log=\fIsubsystem\fR:\fIlevel\fR
-.br
-Performs logging at a given level for the specified subsystems\&. You can specify logging levels for multiple subsystems separating them with commas\&. For example:
-.sp     
-.nf     
-\f3\-\-log=fields:finest,codegen:info\fP
-.fi     
-.sp     
-
-.TP
---optimistic-types=[true|false]
-.br
+\-\-optimistic\-types=[true|false]
+.RS 4
 Enables or disables optimistic type assumptions with deoptimizing recompilation\&. Running with optimistic types will yield higher final speed, but may increase warmup time\&.
-.TP
---package=\fIname\fR
-.br
-Specifies the package to which generated class files are added\&.
-.TP
---parse-only
-.br
-Parses the code without compiling\&.
-.TP
---print-ast
-.br
-Prints the abstract syntax tree\&.
-.TP
---print-code
-.br
-Prints bytecode\&.
-.TP
---print-lower-ast
-.br
-Prints the lowered abstract syntax tree\&.
-.TP
---print-lower-parse
-.br
-Prints the lowered parse tree\&.
-.TP
---print-no-newline
-.br
-Forces other \f3--print*\fR options to print the output on one line\&.
-.TP
---print-parse
-.br
-Prints the parse tree\&.
-.TP
---print-symbols
-.br
-Prints the symbol table\&.
-.TP
--pcs, --profile-callsites
-.br
-Dumps callsite profile data\&.
-.TP
--scripting
-.br
+.RE
+.PP
+\-scripting
+.RS 4
 Enables shell scripting features\&.
-.TP
---stderr=\fIfilename\fR|\fIstream\fR|\fItty\fR
-.br
-Redirects the standard error stream to the specified file, stream (for example, to \f3stdout\fR), or text terminal\&.
-.TP
---stdout=\fIfilename\fR|\fIstream\fR|\fItty\fR
-.br
-Redirects the standard output stream to the specified file, stream (for example, to \f3stderr\fR), or text terminal\&.
-.TP
--strict
-.br
+.RE
+.PP
+\-strict
+.RS 4
 Enables strict mode, which enforces stronger adherence to the standard (ECMAScript Edition 5\&.1), making it easier to detect common coding errors\&.
-.TP
--t=\fIzone\fR , -timezone=\fIzone\fR
+.RE
+.PP
+\-t=\fIzone\fR
 .br
-Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the \f3Date\fR object\&.
-.TP
--tcs=\fIparameter\fR , --trace-callsites=\fIparameter\fR
-.br
-Enables callsite trace mode\&. Possible parameters are the following:
-.RS     
-.TP     
-miss
-Trace callsite misses\&.
-.TP     
-enterexit
-Trace callsite enter/exit\&.
-.TP     
-objects
-Print object properties\&.
+\-timezone=\fIzone\fR
+.RS 4
+Sets the specified time zone for script execution\&. It overrides the time zone set in the OS and used by the
+\fBDate\fR
+object\&.
 .RE     
-
-.TP
---verify-code
+.PP
+\-v
 .br
-Verifies bytecode before running\&.
-.TP
--v, -version
-.br
+\-version
+.RS 4
 Prints the Nashorn version string\&.
-.TP
--xhelp
-.br
-Prints extended help for command-line options\&.
-.SH EXAMPLES    
-\f3Example 1 Running a Script with Nashorn\fR
+.RE
+.SH "EXAMPLES"
+.PP
+\fBExample 1 \fRRunning a Script with Nashorn
+.RS 4
 .sp     
+.if n \{\
+.RS 4
+.\}
 .nf     
-\f3jjs script\&.js\fP
+\fBjjs script\&.js\fR
+ 
 .fi     
-.nf     
-\f3\fP
-.fi     
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 2 \fRRunning Nashorn in Interactive Mode
+.RS 4
 .sp     
-\f3Example 2 Running Nashorn in Interactive Mode\fR
-.sp     
+.if n \{\
+.RS 4
+.\}
 .nf     
-\f3>> \fIjjs\fR\fP
+\fB>> \fR\fB\fBjjs\fR\fR
+\fBjjs> \fR\fB\fBprintln("Hello, World!")\fR\fR
+\fBHello, World!\fR
+\fBjjs> \fR\fB\fBquit()\fR\fR
+\fB>>\fR
+ 
 .fi     
-.nf     
-\f3jjs> \fIprintln("Hello, World!")\fR\fP
-.fi     
-.nf     
-\f3Hello, World!\fP
-.fi     
-.nf     
-\f3jjs> \fIquit()\fR\fP
-.fi     
-.nf     
-\f3>>\fP
-.fi     
-.nf     
-\f3\fP
-.fi     
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBExample 3 \fRPassing Arguments to Nashorn
+.RS 4
 .sp     
-\f3Example 3 Passing Arguments to Nashorn\fR
-.sp     
+.if n \{\
+.RS 4
+.\}
 .nf     
-\f3>> \fIjjs \-\- a b c\fR\fP
+\fB>> \fR\fB\fBjjs \-\- a b c\fR\fR
+\fBjjs> \fR\fB\fBarguments\&.join(", ")\fR\fR
+\fBa, b, c\fR
+\fBjjs>\fR
+ 
 .fi     
-.nf     
-\f3jjs> \fIarguments\&.join(", ")\fR\fP
-.fi     
-.nf     
-\f3a, b, c\fP
-.fi     
-.nf     
-\f3jjs>\fP
-.fi     
-.nf     
-\f3\fP
-.fi     
-.sp     
-.SH SEE\ ALSO    
-\f3jrunscript\fR
+.if n \{\
 .RE
+.\}
+.RE
+.SH "SEE ALSO"
+.PP
+\fBjrunscript\fR
 .br
 'pl 8.5i
 'bp