args Java中命令行参数解析的可重用解决方案
参数Java中命令行参数解析的可重用解决方案用法
// Initiate the arguments engine.
ArgsEngine engine = new ArgsEngine ();
// Configure the switches/options. Use true for valued options.
engine.add( \"-q\", \"--quiet\");
engine.add( \"-o\", \"--redirect-output\", true);
engine.add( \"-h\", \"--help\");
// Perform the parsing. The 'args' is the String[] received by main method.
engine.parse(args);
下载地址
用户评论