private static void configureJShell(String[] args, JShell shell) throws IOException {
    // todo: add more parameters if needed
    boolean cpFound = false;
    boolean cpFileFound = false;
    for (String arg : args) {
      if (ARG_CLASSPATH.equals(arg)) {
        cpFound = true;
      }
      else if (ARG_CLASSPATH_FILE.equals(arg)) {
        cpFileFound = true;
      }
      else {
        if (cpFound) {
          cpFound = false;
          for (String path : arg.split(File.pathSeparator)) {
            shell.addToClasspath(path);
          }
        }
        else if (cpFileFound) {
          cpFileFound = false;
          final File cpFile = new File(arg);
          try (final BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(cpFile), StandardCharsets.UTF_8))) {
            for (String line = reader.readLine(); line != null; line = reader.readLine()) {
              shell.addToClasspath(line);
            }
          }
        }
      }
    }
  }
private static void configureJShell(String[] args, JShell shell)