code: public static String exec(String command, String cs) {
      return buildProcess(command).withCharset(cs).withCMD().exec();
    }
docs: <p>Executes the given command as if it had been executed from the command line of the host OS
  (cmd.exe on windows, /bin/sh on *nix) and returns all content sent to standard out as a string.  If the command
  finishes with a non zero return value, a {@link CommandFailedException} is thrown.</p>
  <p/>
  <p>Content sent to standard error by the command will be forwarded to standard error for this JVM.  If you wish
  to capture StdErr as well, use {@link #buildProcess(String)} to create a ProcessStarter and call the {@link ProcessStarter#withStdErrHandler(gw.util.ProcessStarter.OutputHandler)}
  method.</p>
  <p/>
  <p>This method blocks on the execution of the command.</p>
  <p/>
  <p>
  <b>Example Usages:</b>
  <pre>
  var currentDir = Shell.exec( "dir" ) // windows
  var currentDir = Shell.exec( "ls" )  // *nix
  Shell.exec( "rm -rf " + directoryToNuke )
  </pre>
  </p>
  
  @param command the command to execute
  @return the content of standard out
  @throws CommandFailedException if the process finishes with a non-zero return value
  <p/>
  <p><b>Note:<b> On windows, CMD.EXE will be used to interpret "command" so that commands like "dir" work as expected.  This can
  occasionally cause problems due to limitations of CMD.EXE (e.g. a command string may be too long for it.)  In these cases consider
  using the {@link #buildProcess(String)}