JetBrains/intellij-community · error · ConfigurationException

Enter file location

Error message

Enter {0} file location

What it means

Thrown by ProjectNameStep.validate() when the project file directory field is empty. The step needs a location to run ProjectWizardUtil.createDirectoryIfNotExists and to compute the .ipr or .idea path, so empty location aborts validation.

Solutions

  1. Fill in the project location field (absolute path) in the wizard step
  2. Re-pick the parent directory via browse so the field is re-derived from the name
  3. Programmatically, set context.setProjectFileDir(LocalFileSystem.getInstance().refreshAndFindFileByPath(baseDir)) equivalent before validate()
Defensive patterns

Strategy: validation

Validate before calling

if (step.getProjectFileDirectory().isEmpty()) {
  wizardContext.setProjectFileDir(VfsUtilCore.pathToUrl(defaultBaseDir));
}
step.validate();

Prevention

When it happens

Trigger: Calling validate() on ProjectNameStep while getProjectFileDirectory() returns the empty string — path component cleared or WizardContext has no project file directory set.

Common situations: User erased the location line in the new-project step; wizard reopened after an earlier failure leaving the path field blank; programmatic use without wizardContext.setProjectFileDir().

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/f17bc42806c6fa2d. Report an issue: GitHub.

Appendix: source

Thrown at java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java:112

    myWizardContext.setProjectFileDirectory(getProjectFileDirectory());
  }

  @Override
  public Icon getIcon() {
    return myWizardContext.getStepIcon();
  }

  @Override
  public boolean validate() throws ConfigurationException {
    String name = myNamePathComponent.getNameValue();
    if (name.isEmpty()) {
      ApplicationNamesInfo info = ApplicationNamesInfo.getInstance();
      throw new ConfigurationException(JavaUiBundle.message("prompt.new.project.file.name", info.getFullProductName(), myWizardContext.getPresentationName()));
    }

    final String projectFileDirectory = getProjectFileDirectory();
    if (projectFileDirectory.isEmpty()) {
      throw new ConfigurationException(JavaUiBundle.message("prompt.enter.project.file.location", myWizardContext.getPresentationName()));
    }

    final boolean shouldPromptCreation = myNamePathComponent.isPathChangedByUser();
    String prefix = JavaUiBundle.message("directory.project.file.directory", myWizardContext.getPresentationName());
    if (!ProjectWizardUtil.createDirectoryIfNotExists(prefix, projectFileDirectory, shouldPromptCreation)) {
      return false;
    }

    boolean shouldContinue = true;

    final String path = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED
                        ? getProjectFileDirectory() + "/" + Project.DIRECTORY_STORE_FOLDER : getProjectFilePath();
    final File projectFile = new File(path);
    if (projectFile.exists()) {
      final String title = myWizardContext.isCreatingNewProject()
                           ? IdeCoreBundle.message("title.new.project")
                           : IdeCoreBundle.message("title.add.module");
      final String message = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED

View on GitHub (pinned to be881553f2)