String strDeviceName = null;
String strBase = null;
CommandLine cmd = null;
try {
CommandLineParser parser = new BasicParser();
Options options = createOptions();
// parse command line passed by user
cmd = parser.parse(options, args, true);
} catch (ParseException e) {
reportError("commandLineFailed",
new String[] {e.getLocalizedMessage()});
printUsage();
System.exit(1);