public static interface Application.CommandLine
app.connect(new Application.CommandLine() { public int onCommandLine(Application source, ApplicationCommandLine remote) { final String[] args; args = remote.getArguments(); // do stuff here in primary with the passed arguments remote.exit(); return 0; } }as ever, the name of a parameter in a method implenting an interface is arbitrary, but naming the ApplicationCommmandLine object
remote
makes the point that it represents the command line
arguments being sent over the wire.
When you handle this signal you need to specify the exit code that the invoking process should in turn return to the shell, ie:
s = app.run(args); System.exit(s);
Modifier and Type | Method and Description |
---|---|
int |
onCommandLine(Application source,
ApplicationCommandLine cmdline) |
int onCommandLine(Application source, ApplicationCommandLine cmdline)