Java Reference
In-Depth Information
Chapter 10
The jjs Command-Line Tool
In this chapter, you will learn:
jjs command-line tool is
What the
jjs command-line tool
How to invoke the
jjs command-line tool
How to pass arguments to the
jjs command-line tool in interactive and
How to use the
scripting mode
To work with the Nashorn script engine, JDK 8 includes a new command-line tool
called jjs . If you wonder what jjs stands for, it stands for Java J ava S cript. The command
is located in the JDK_HOME\bin directory. The command can be used to run scripts in
files or scripts entered on the command-line in interactive mode. It can also be used to
execute shell scripts.
The Syntax
The syntax to invoke the command is:
jjs [options] [script-files] [-- arguments]
[options] are options for the jjs command. Multiple options are
separated by a space
[script-files] is the list of script files to be interpreted by the
Nashorn engine
[-- arguments] is the list of arguments to be passed to the scripts
or the interactive shell as arguments. Arguments are specified
after double hyphens and they can be accessed using the
arguments property inside the script
Search WWH ::

Custom Search