The class that actually does overriding Java Program arguments.
To Use
You need to change the target main class in
/javaprogargoverride-refmap.json.
By specifying
-Drege.rege.misc.javaprogargoverride.Util.overridingArgs (required)
and
-Drege.rege.misc.javaprogargoverride.Util.overridingArgsType
(optional), this class will modify the target main class's
String array.
-Drege.rege.misc.javaprogargoverride.Util.overridingArgs's value is
a string with the following format:
arg1 "arg2" 'arg3' \a\r\g\4 - intepreted as
new String[]{"arg1", "arg2", "arg3", "arg4"}
arg\\1 "arg\\2" 'arg\\3' 'arg'"\\"4 - intepreted as
new String[]{"arg\\1", "arg\\2", "arg\\\\3", "arg\\4"}
See
Util.separateArgs(java.lang.String, java.util.Collection<java.lang.Character>, java.lang.Character, java.util.Map<java.lang.Character, java.lang.Boolean>).
If
-Drege.rege.misc.javaprogargoverride.Util.overridingArgsType's
value is
exec, the value of
-Drege.rege.misc.javaprogargoverride.Util.overridingArgs will be
executed as a command with original Java Program arguments as stdin and its
stdout will be used for the arguments to override. WARN: THIS CAN EXECUTE
ARBITRARY COMMANDS, INCLUDING WHICH ARE MALICIOUS. If
-Drege.rege.misc.javaprogargoverride.Util.overridingArgsType's value
is something other than
exec, or unspecified, the value of
-Drege.rege.misc.javaprogargoverride.Util.overridingArgs will be
directly used for the arguments to override.