private static void restartOnWindows(boolean elevate, List<String> beforeRestart, List<String> args) throws IOException {
    var starter = ourStarter.getValue();
    if (starter == null) throw new IOException("Starter executable not found in " + PathManager.getBinPath());
    var command = prepareCommand(beforeRestart);
    command.add(String.valueOf((elevate ? 2 : 1) + args.size()));
    if (elevate) {
      command.add(Path.of(PathManager.getBinPath(), "launcher.exe").toString());
    }
    command.add(starter.toString());
    command.addAll(args);
    runRestarter(command);
  }
private static void restartOnWindows(boolean elevate, List<String> beforeRestart, List<String> args)