docs: public static int mainWithReturnCode(String args[]) {
          TimeZone.setDefault(TimeZone.getTimeZone("GMT+0"));
          // Initialize parameter defaults
          String serverList = "localhost";
          int port = 21212;
          String user = "";
          String password = "";
          String credentials = "";
          String kerberos = "";
          FileReader fr = null;
          List<String> queries = null;
          String ddlFileText = "";
          String sslConfigFile = null;
          boolean enableSSL = false;
  
          // Parse out parameters
          for (int i = 0; i < args.length; i++) {
              String arg = args[i];
              if (arg.startsWith("--servers=")) {
                  serverList = extractArgInput(arg);
                  if (serverList == null) return -1;
              }
              else if (arg.startsWith("--port=")) {
                  String portStr = extractArgInput(arg);
                  if (portStr == null) return -1;
                  port = Integer.valueOf(portStr);
              }
              else if (arg.startsWith("--user=")) {
                  user = extractArgInput(arg);
                  if (user == null) return -1;
              }
              else if (arg.startsWith("--password=")) {
                  password = extractArgInput(arg);
                  if (password == null) return -1;
              }
              else if (arg.startsWith("--credentials")) {
                  credentials = extractArgInput(arg);
                  if (credentials == null) return -1;
              }
              else if (arg.startsWith("--kerberos=")) {
                  kerberos = extractArgInput(arg);
                  if (kerberos == null) return -1;
              }
              else if (arg.startsWith("--kerberos")) {
                  kerberos = "VoltDBClient";
              }
              else if (arg.startsWith("--query=")) {
                  List<String> argQueries = SQLLexer.splitStatements(arg.substring(8)).getCompletelyParsedStmts();
                  if (!argQueries.isEmpty()) {
                      if (queries == null) {
                          queries = argQueries;
                      }
                      else {
                          queries.addAll(argQueries);
                      }
                  }
              }
              else if (arg.startsWith("--output-format=")) {
                  String formatName = extractArgInput(arg);
                  if (formatName == null) return -1;
                  formatName = formatName.toLowerCase();
                  if (formatName.equals("fixed")) {
                      m_outputFormatter = new SQLCommandOutputFormatterDefault();
                  }
                  else if (formatName.equals("csv")) {
                      m_outputFormatter = new SQLCommandOutputFormatterCSV();
                  }
                  else if (formatName.equals("tab")) {
                      m_outputFormatter = new SQLCommandOutputFormatterTabDelimited();
                  }
                  else {
                      printUsage("Invalid value for --output-format");
                      return -1;
                  }
              }
              else if (arg.startsWith("--stop-on-error=")) {
                  String optionName = extractArgInput(arg);
                  if (optionName == null) return -1;
                  optionName = optionName.toLowerCase();
                  if (optionName.equals("true")) {
                      m_stopOnError = true;
                  }
                  else if (optionName.equals("false")) {
                      m_stopOnError = false;
                  }
                  else {
                      printUsage("Invalid value for --stop-on-error");
                      return -1;
                  }
              }
              else if (arg.startsWith("--ddl-file=")) {
                  String ddlFilePath = extractArgInput(arg);
                  if (ddlFilePath == null) return -1;
                  try {
                      File ddlJavaFile = new File(ddlFilePath);
                      Scanner scanner = new Scanner(ddlJavaFile);
                      ddlFileText = scanner.useDelimiter("\\Z").next();
                      scanner.close();
                  } catch (FileNotFoundException e) {
                      printUsage("DDL file not found at path:" + ddlFilePath);
                      return -1;
                  }
              }
              else if (arg.startsWith("--query-timeout=")) {
                  m_hasBatchTimeout = true;
                  String batchTimeoutStr = extractArgInput(arg);
                  if (batchTimeoutStr == null) return -1;
                  m_batchTimeout = Integer.valueOf(batchTimeoutStr);
              }
  
              // equals check starting here
              else if (arg.equals("--output-skip-metadata")) {
                  m_outputShowMetadata = false;
              }
              else if (arg.startsWith("--ssl=")) {
                  enableSSL = true;
                  sslConfigFile = extractArgInput(arg);
                  if (sslConfigFile == null) return -1;
              }
              else if (arg.startsWith("--ssl")) {
                  enableSSL = true;
                  sslConfigFile = null;
              }
              else if (arg.equals("--debug")) {
                  m_debug = true;
              }
              else if (arg.equals("--help")) {
                  printHelp(System.out); // Print readme to the screen
                  System.out.println("\n\n");
                  printUsage();
                  return -1;
              }
              else if (arg.equals("--no-version-check")) {
                  m_versionCheck = false; // Disable new version phone home check
              }
              else if ((arg.equals("--usage")) || (arg.equals("-?"))) {
                  printUsage();
                  return -1;
              }
              else {
                  printUsage("Invalid Parameter: " + arg);
                  return -1;
              }
          }
  
          // Split server list
          String[] servers = serverList.split(",");
  
          // Phone home to see if there is a newer version of VoltDB
          if (m_versionCheck) {
              openURLAsync();
          }
  
          // read username and password from txt file
          if (credentials != null && !credentials.trim().isEmpty()) {
              Properties props = MiscUtils.readPropertiesFromCredentials(credentials);
              user = props.getProperty("username");
              password = props.getProperty("password");
          }
  
          try
          {
              // If we need to prompt the user for a password, do so.
              password = CLIConfig.readPasswordIfNeeded(user, password, "Enter password: ");
          }
          catch (IOException ex)
          {
              printUsage("Unable to read password: " + ex);
          }
  
          // Create connection
          ClientConfig config = new ClientConfig(user, password, null);
          if (enableSSL) {
              if (sslConfigFile != null && !sslConfigFile.trim().isEmpty()) {
                  config.setTrustStoreConfigFromPropertyFile(sslConfigFile);
              } else {
                  config.setTrustStoreConfigFromDefault();
              }
              config.enableSSL();
          }
          config.setProcedureCallTimeout(0);  // Set procedure all to infinite timeout, see ENG-2670
          try {
              // if specified enable kerberos
              if (!kerberos.isEmpty()) {
                  config.enableKerberosAuthentication(kerberos);
              }
              m_client = getClient(config, servers, port);
          } catch (Exception exc) {
              System.err.println(exc.getMessage());
              return -1;
          }
  
          try {
              if (! ddlFileText.equals("")) {
                  // fast DDL Loader mode
                  // System.out.println("fast DDL Loader mode with DDL input:\n" + ddlFile);
                  m_client.callProcedure("@AdHoc", ddlFileText);
                  return m_exitCode;
              }
  
              // Load system procedures
              loadSystemProcedures();
  
              // Load user stored procs
              loadStoredProcedures(Procedures, Classlist);
  
              // Removed code to prevent Ctrl-C from exiting. The original code is visible
              // in Git history hash 837df236c059b5b4362ffca7e7a5426fba1b7f20.
  
              m_interactive = true;
              if (queries != null && !queries.isEmpty()) {
                  // If queries are provided via command line options run them in
                  // non-interactive mode.
                  //TODO: Someday we should honor batching.
                  m_interactive = false;
                  for (String query : queries) {
                      executeStatement(query, null, 0);
                  }
              }
              // This test for an interactive environment is mostly
              // reliable. See stackoverflow.com/questions/1403772.
              // It accurately detects when data is piped into the program
              // but it fails to distinguish the case when data is ONLY piped
              // OUT of the command -- that's a possible but very strange way
              // to run an interactive session, so it's OK that we don't support
              // it. Instead, in that edge case, we fall back to non-interactive
              // mode but IN THAT MODE, we wait on and process user input as if
              // from a slow pipe. Strange, but acceptable, and preferable to the
              // check used here in the past (System.in.available() > 0)
              // which would fail in the opposite direction, when a 0-length
              // file was piped in, showing an interactive greeting and prompt
              // before quitting.
              if (System.console() == null && m_interactive) {
                  m_interactive = false;
                  executeNoninteractive();
              }
              if (m_interactive) {
                  // Print out welcome message
                  System.out.printf("SQL Command :: %s%s:%d\n", (user == "" ? "" : user + "@"), serverList, port);
                  interactWithTheUser();
              }
          }
          catch (SQLCmdEarlyExitException e) {
              return m_exitCode;
          }
          catch (Exception x) {
              try { stopOrContinue(x); } catch (SQLCmdEarlyExitException e) { return m_exitCode; }
          }
          finally {
              try { m_client.close(); } catch (Exception x) { }
          }
          // Processing may have been continued after one or more errors.
          // Reflect them in the exit code.
          // This might be a little unconventional for an interactive session,
          // but it's also likely to be ignored in that case, so "no great harm done".
          //* enable to debug */ System.err.println("Exiting with code " + m_exitCode);
          return m_exitCode;
      }