Java Reference
In-Depth Information
The Options
The
jjs
tool supports several options. Table
10-1
lists all the options for the
jjs
tool.
Some of the options have a variant that work the same way; for example, the options
-classpath
and
-cp
are synonymous. Both are used to set CLASSPATH. Notice that some
of the options start with two hyphens. To print the list of all options, run the tool on the
command prompt with the
-xhelp
option:
jjs -xhelp
Table 10-1.
Options for the jjs Comand-Line Tool
Option
Description
-D<name>=<value>
Sets a system property for the Java runtime. This
option can be repeated to set multiple runtime
property values.
-ccs=<size>
--class-cache-size=<size>
Sets the class cache size (in bytes). By default, the
class cache size is set to 50 bytes. You can use k/K,
m/M and g/G with the size to mean KB, MB, and GB
in size. The options
-css=200
and
-css=2M
set the
class cache size to 200 bytes and 2 MB, respectively.
-classpath <path>
-cp <path>
Specifies CLASSPATH.
-co
--compile-only
Compiles the script without running. By default, it
is disabled, which means that scripts are compiled
and run.
--const-as-var
Replaces the keyword
const
in scripts with the
keyword
var
. This option is available if a script uses
the
const
keyword, which is not recognized by
Nashorn. By default, it is disabled.
-d=<path>
--dump-debug-dir=<path>
Specifies a destination directory to dump class files
for scripts.
--debug-lines
Generates a line number table in
.class
files. By
default, it is enabled. Specify
--debug-lines=false
to disable this feature.
--debug-locals
Generates a local variable table in
.class
files. By
default, it is set to
false
.
-doe
--dump-on-error
When this is specified, a full stack trace of the error is
printed. By default, a brief error message is printed.
(
continued
)
Search WWH ::
Custom Search