@Override
  public ProcessProxy createCommandLineProxy(JavaCommandLine javaCmdLine) throws ExecutionException {
    JavaParameters javaParameters = javaCmdLine.getJavaParameters();
    String mainClass = javaParameters.getMainClass();

    if (ourMayUseLauncher && mainClass != null) {
      String rtJarPath = JavaSdkUtil.getIdeaRtJarPath();
      boolean runtimeJarFile = new File(rtJarPath).isFile() && FileUtil.isAncestor(PathManager.getHomePath(), rtJarPath, true);

      if (runtimeJarFile || javaParameters.getModuleName() == null) {
        try {
          ProcessProxyImpl proxy = new ProcessProxyImpl(StringUtil.getShortName(mainClass));
          String port = String.valueOf(proxy.getPortNumber());
          String binPath = proxy.getBinPath();
          JavaSdkVersion jdkVersion = JavaSdkVersionUtil.getJavaSdkVersion(javaParameters.getJdk());
          if (jdkVersion != null && !jdkVersion.isAtLeast(JavaSdkVersion.JDK_1_7)) {
            throw new ExecutionException(JavaBundle.message("error.message.ide.does.not.support.starting.processes.using.old.java", 
                                                            jdkVersion.getDescription()));
          }

          if (runtimeJarFile) {
            javaParameters.getVMParametersList().add("-javaagent:" + rtJarPath + '=' + port + ':' + binPath);
          }
          else {
            JavaSdkUtil.addRtJar(javaParameters.getClassPath());

            ParametersList vmParametersList = javaParameters.getVMParametersList();
            vmParametersList.defineProperty(AppMainV2.LAUNCHER_PORT_NUMBER, port);
            vmParametersList.defineProperty(AppMainV2.LAUNCHER_BIN_PATH, binPath);

            boolean isJava21preview = JavaSdkVersion.JDK_21.equals(jdkVersion) &&
                                      javaParameters.getVMParametersList().getParameters().contains(JavaParameters.JAVA_ENABLE_PREVIEW_PROPERTY);
            if (isJava21preview) {
              vmParametersList.defineProperty(AppMainV2.LAUNCHER_USE_JDK_21_PREVIEW, Boolean.toString(isJava21preview));
            }

            javaParameters.getProgramParametersList().prepend(mainClass);
            javaParameters.setMainClass(AppMainV2.class.getName());
          }

          return proxy;
        }
        catch (ExecutionException e) {
          throw e;
        }
        catch (Exception e) {
          Logger.getInstance(ProcessProxy.class).warn(e);
        }
      }
    }

    return null;
  }
@Override
  public ProcessProxy createCommandLineProxy(JavaCommandLine javaCmdLine)