Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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
Date: 21 November 2013
SectDesc: Scripting Tools
Title: jrunscript.1
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
jrunscript [options] [arguments]
options The command-line options. See Options.
arguments Arguments, when used, follow immediately after options or the command name. See Arguments.
-classpath path
Indicate where any class files are that the script needs to access.
-cp path
Same as \f3-classpath\f3path.
-Dname=value
Sets a Java system property.
-Jflag
Passes \f3flag directly to the Java Virtual Machine where the \f3jrunscript command is running.
-I language
Uses the specified scripting language. By default, JavaScript is used. To use other scripting languages, you must specify the corresponding script engine's JAR file with the \f3-cp or \f3-classpath option.
-e script
Evaluates the specified script. This option can be used to run one-line scripts that are specified completely on the command line.
-encoding encoding
Specifies the character encoding used to read script files.
-f script-file
Evaluates the specified script file (batch mode).
-f -
Reads and evaluates a script from standard input (interactive mode).
-help
Displays a help message and exits.
-?
Displays a help message and exits.
-q
Lists all script engines available and exits.
\f3jrunscript -e "print('hello world')"
\f3jrunscript -e "cat('http://www.example.com')"
\f3
\f3jrunscript -l js -f test.js
\f3
\f3jrunscript
\f3js> print('Hello World\en');
\f3Hello World
\f3js> 34 + 55
\f389.0
\f3js> t = new java.lang.Thread(function() { print('Hello World\en'); })
\f3Thread[Thread-0,5,main]
\f3js> t.start()
\f3js> Hello World
\f3
\f3js>
\f3
\f3jrunscript test.js arg1 arg2 arg3
\f3
'pl 8.5i 'bp