code: protected static String tryCommands (String[] cmds)
      {
          if (cmds == null) {
              return null;
          }
  
          String output;
  
          for (int ii = 0; ii < cmds.length; ii++) {
              output = runCommand(cmds[ii]);
              if (output != null) {
                  return output;
              }
          }
  
          return null;
      }
docs: Takes a lists of commands and tries to run each one till one works.
  The idea being to be able to 'gracefully' cope with not knowing
  where a command is installed on different installations.