Parser parser = new Parser(args); Runnable command = parser.parseCommand(); if (command != null) { command.run(); }