public class DebugMain
extends java.lang.Object
Main that allows us to run a batch of scripts without using the
-e load(...) arguments. As well any argument not paired to a known kind (see below) will be considered
as an absolute path to a script (*.js) file.
-debug to have the interpreter generate debugging tracing-e [script_src] to evaluate the following argument as a script-encoding to set the character encoding to use-f [absolute_file_paths] to specify one or more *.js files to evaluate. This argument differs
from the Rhino Main one, in that any following arguments will be treated as absolute
paths to script (*.js) files.-fatal-warnings to have all warnings are treated as error-help or -?, to pretty-print the available commands-opt or -O to set the optimization level. Where available levels are -1 (interpret only), 0 (none), 1-9 (all optimizations)-port [port] to set the port to communicate on-sealedlib to set the standard libraries as sealed - meaning they cannot be modified by any evaluating script(s)-strict to set the interpreter in strict mode and report all warnings-suspend to set if the debugger should start suspended and wait for a client to connect before continuing-trace to enabled debugger tracing-version [version_number], where version_number is one of: 100, 110, 120, 130, 140, 150, 160, 170-w to report warningsorg.mozilla.javascript.jar,
org.eclipse.wst.jsdt.debug.rhino.debugger.jar and org.eclipse.wst.jsdt.debug.transport. Also the
fully qualified name use to run DebugMain is org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugMain
Examples
%>java DebugMain -opt 7 -strict -f /home/user/scripts/a.js /home/user/scripts/b.js -version 170
%> java DebugMain -version 140 -e load('/home/user/scripts/a.js','/home/user/scripts/b.js')| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARG_DEBUG
Constant representing the debug argument
Value is: -debug |
static java.lang.String |
ARG_E
Constant representing the evaluate argument
Value is: -e |
static java.lang.String |
ARG_ENCODING
Constant representing the encoding argument
Value is: -encoding |
static java.lang.String |
ARG_F
Constant representing the script file(s) argument
Value is: -f |
static java.lang.String |
ARG_FATAL_WARNINGS
Constant representing the fatal-warnings argument
Value is: -fatal-warnings |
static java.lang.String |
ARG_HELP
Constant representing the help argument
Value is: -help |
static java.lang.String |
ARG_O
Constant representing the optimization argument
Value is: -O |
static java.lang.String |
ARG_OPT
Constant representing the optimization argument
Value is: -opt |
static java.lang.String |
ARG_QM
Constant representing the help argument
Value is: -? |
static java.lang.String |
ARG_SEALEDLIB
Constant representing the sealed lib argument
Value is: -sealedlib |
static java.lang.String |
ARG_STRICT
Constant representing the strict argument
Value is: -strict |
static java.lang.String |
ARG_W
Constant representing the report warnings argument
Value is: -w |
static java.lang.String |
FROM_EVAL
Copy from
Main to specify as the path when evaluating a script via the -e argument
Value is: <command> |
static java.lang.String |
GLOBAL_ARGUMENTS
Constant representing the name of the array containing the original script arguments in the global context
Value is: arguments |
static java.lang.String |
MSG_SHELL_INVALID
Constant representing the invalid message identifier for
Main
Value is: msg.shell.invalid |
static java.lang.String |
MSG_SHELL_USAGE
Constant representing the invalid usage message identifier for
Main
Value is: msg.shell.usage |
| Constructor and Description |
|---|
DebugMain() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |
public static final java.lang.String ARG_DEBUG
-debugpublic static final java.lang.String ARG_E
-epublic static final java.lang.String ARG_ENCODING
-encodingpublic static final java.lang.String ARG_F
-fpublic static final java.lang.String ARG_FATAL_WARNINGS
-fatal-warningspublic static final java.lang.String ARG_HELP
-helppublic static final java.lang.String ARG_O
-Opublic static final java.lang.String ARG_OPT
-optpublic static final java.lang.String ARG_QM
-?public static final java.lang.String ARG_SEALEDLIB
-sealedlibpublic static final java.lang.String ARG_STRICT
-strictpublic static final java.lang.String ARG_W
-wpublic static final java.lang.String MSG_SHELL_INVALID
Main
msg.shell.invalidpublic static final java.lang.String MSG_SHELL_USAGE
Main
msg.shell.usagepublic static final java.lang.String FROM_EVAL
Main to specify as the path when evaluating a script via the -e argument
<command>public static final java.lang.String GLOBAL_ARGUMENTS
argumentsCopyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.