code: public static void exec(final boolean wait, final String command, final String... parms)
              throws IOException
     {
        String[] commandTokens = parms == null ? new String[1] : new String[parms.length + 1];
        commandTokens[0] = command;
  
        if (commandTokens.length > 1)
        {
           System.arraycopy(parms, 0, commandTokens, 1, parms.length);
        }
  
        Runtime.getRuntime().exec(commandTokens, null);
     }
docs: Execute the given system command
  
  @return 0 on successful completion, any other return code denotes failure