@Override
  protected JavaParameters createJavaParameters() throws ExecutionException {
    final JavaParameters params = new JavaParameters();
    T configuration = getConfiguration();

    params.setMainClass(ReadAction.compute(() -> myConfiguration.getRunClass()));
    String mainClass = params.getMainClass();
    try {
      JavaParametersUtil.configureConfiguration(params, myConfiguration);
    }
    catch (ProgramParametersConfigurator.ParametersConfiguratorException e) {
      throw new ExecutionException(e);
    }

    final JavaRunConfigurationModule module = myConfiguration.getConfigurationModule();
    ReadAction.nonBlocking((Callable<Void>)() -> {
      final String jreHome = getTargetEnvironmentRequest() == null && myConfiguration.isAlternativeJrePathEnabled() ? myConfiguration.getAlternativeJrePath() : null;
      if (module.getModule() != null) {
        DumbService.getInstance(module.getProject()).runWithAlternativeResolveEnabled(() -> {
          if (mainClass == null) {
            throw new CantRunException(ExecutionBundle.message("no.main.class.defined.error.message"));
          }
          int classPathType = JavaParametersUtil.getClasspathType(module, mainClass, false,
                                                                  isProvidedScopeIncluded());
          JavaParametersUtil.configureModule(module, params, classPathType, jreHome);
        });
      }
      else {
        JavaParametersUtil.configureProject(module.getProject(), params, JavaParameters.JDK_AND_CLASSES_AND_TESTS, jreHome);
      }
      return null;
    })
      .expireWith(configuration.getProject())
      .executeSynchronously();

    setupModulePath(params, module);

    params.setShortenCommandLine(configuration.getShortenCommandLine(), configuration.getProject());

    setupJavaParameters(params);

    return params;
  }
@Override
  protected JavaParameters createJavaParameters()