I have two comments:
1/ you can create you own descriptor programmatically for CRaSH:
Descriptor descriptor = CommandFactory.DEFAULT.create(CRaSH.class)
2/ have you tried instead to instantiate the CRaSH class and call the main method directly ?
CRaSH crash = new CRaSH();
crash.main(….);
the CRaSH standalone uses nothing else more than the CLI framework for processing the arguments of the JVM.
@Command
public void main(
@Option(names= {"non-interactive"})
@Usage("non interactive mode, the JVM io will not be used")
Boolean nonInteractive,
@Option(names={"c","cmd"})
@Usage("the command mounts")
String cmd,
@Option(names={"conf"})
@Usage("the conf mounts")
String conf,
@Option(names={"p","property"})
@Usage("set a property of the form a=b")
List<String> properties,
@Option(names = {"cmd-folder"})
@Usage("a folder in which commands should be extracted")
String cmdFolder,
@Option(names = {"conf-folder"})
@Usage("a folder in which configuration should be extracted")
String confFolder,
@Argument(name = "pid")
@Usage("the optional list of JVM process id to attach to")
List<Integer> pids) throws Exception {
...
}
that would provide you a much more usable interface than the mere String line.
Julien Viet
julienviet.com
> --
> Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "CRaSH User Group".
> Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse
crash-users...@googlegroups.com (mailto:
crash-users...@googlegroups.com).
> Pour obtenir davantage d'options, consultez la page
https://groups.google.com/d/optout.