code: @Deprecated
      public static ByteArrayOutputStream launchProcess(
              String command, final Map environment, final String workDir,
              ExecuteResultHandler resultHandler) throws IOException {
  
          String[] cmdlist = command.split(" ");
  
          CommandLine cmd = new CommandLine(cmdlist[0]);
          for (String cmdItem : cmdlist) {
              if (!StringUtils.isBlank(cmdItem)) {
                  cmd.addArgument(cmdItem);
              }
          }
  
          DefaultExecutor executor = new DefaultExecutor();
  
          executor.setExitValue(0);
          if (!StringUtils.isBlank(workDir)) {
              executor.setWorkingDirectory(new File(workDir));
          }
  
          ByteArrayOutputStream out = new ByteArrayOutputStream();
  
          PumpStreamHandler streamHandler = new PumpStreamHandler(out, out);
          executor.setStreamHandler(streamHandler);
  
          try {
              if (resultHandler == null) {
                  executor.execute(cmd, environment);
              } else {
                  executor.execute(cmd, environment, resultHandler);
              }
          } catch (ExecuteException ignored) {
          }
  
          return out;
  
      }
docs: If it is backend, please set resultHandler, such as DefaultExecuteResultHandler
  If it is frontend, ByteArrayOutputStream.toString will return the calling result
  <p>
  This function will ignore whether the command is successfully executed or not
  
  @param command       command to be executed
  @param environment   env vars
  @param workDir       working directory
  @param resultHandler exec result handler
  @return output stream
  @throws IOException