IntelliJ IDEA 2024.3 Help

Import a project from Eclipse

Import a project to IntelliJ IDEA

  1. Launch IntelliJ IDEA.

    If the Welcome screen opens, click Open.

    Otherwise, go to File | Open in the main menu.

  2. In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open.

  3. When you import or clone a project for the first time, IntelliJ IDEA analyzes it. If the IDE detects more than one configuration (for example, Eclipse and Gradle), it prompts you to select which configuration you want to use.

    Select the necessary configuration and click OK.

    Dialog that prompts you to select how you want to import the project

    The IDE pre-configures the project according to your choice. For example, if you select Gradle, IntelliJ IDEA executes its build scripts, loads dependencies, and so on.

  4. If you have been working with another project, select whether you want to open the new project in a new dialog or in the current one.

Import a project with settings

Use this type of import if your project comes from an external model, and you want to import it as a whole. In this case, your Eclipse project will be migrated to IntelliJ IDEA.

  1. Launch IntelliJ IDEA.

    If the Welcome screen opens, press Ctrl+Shift+A, type project from existing sources, and click the Import project from existing sources action in the popup.

    Otherwise, go to File | New | Project from Existing Sources in the main menu.

  2. In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open.

  3. Select Import project from external model | Eclipse and click Next.

    Importing a project from an external model
  4. Configure the project:

    • Select Eclipse projects directory: specify the path to the Eclipse workspace that contains projects that you want to import.

    • Create module files near .classpath files: create a new IntelliJ IDEA module per each Eclipse project in the respective project directories. The IntelliJ IDEA project in the specified format will be created in the root of the Eclipse workspace, or Eclipse project directory.

    • Keep project and module files in: if you want to import your project to IntelliJ IDEA without modifying the original Eclipse project, specify the folder in which the IDE will create the .iml file (module file) and the .idea directory with configuration files.

      If you leave the default path, IntelliJ IDEA creates the .iml file and .idea directory in the Eclipse project folder.

    • Project file format: it's recommended that you use the directory-based format.

    • Link created IntelliJ IDEA modules to Eclipse project files: automatically keep the Eclipse projects and IntelliJ IDEA modules synchronized.

    • Detect test sources: specify the list of folders in which test sources are stored. For more information about the wildcard syntax, refer to the Compiler.

    Click Next.

    Importing a project from Eclipse
  5. Review the projects detected in the selected Eclipse workspace and select the ones that you want to import to IntelliJ IDEA. Each Eclipse project will be converted into an IntelliJ IDEA module.

    Click Next.

    Importing a project from Eclipse
  6. Select the code style configuration that you want to use in the project and click Next.

  7. Specify the SDK that you want to use.

    If the necessary SDK is already defined in IntelliJ IDEA, select it from the list on the left. Otherwise, click the Add button and add a new SDK.

  8. Click Create.

Import an Eclipse project as a module

  1. In the main menu, go to File | New | Module from Existing Sources.

  2. In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open.

  3. Select Import module from external model | Eclipse and click Next.

    Importing a project from Eclipse as a module
  4. Configure the module:

    • Select Eclipse projects directory: specify the path to the Eclipse workspace that contains projects that you want to import.

    • Create module files near .classpath files: create a new IntelliJ IDEA module per each Eclipse project the respective project directories. The IntelliJ IDEA project in the specified format will be created in the root of the Eclipse workspace, or Eclipse project directory.

    • Keep project and module files in: if you want to import your project to IntelliJ IDEA without modifying the original Eclipse project, specify the folder in which the IDE will create the .iml file (module file) and the .idea directory with configuration files.

      If you leave the default path, IntelliJ IDEA creates the .iml file and .idea directory in the Eclipse project folder.

    • Link created IntelliJ IDEA modules to Eclipse project files: automatically keep the Eclipse projects and IntelliJ IDEA modules synchronized.

    • Detect test sources: specify the list of folders in which test sources are stored. For more information about the wildcard syntax, refer to the Compiler section.

    Click Next.

    Importing a project from Eclipse as a module
  5. Review the projects detected in the selected Eclipse workspace and select the ones that you want to import to IntelliJ IDEA. Each Eclipse project will be converted into an IntelliJ IDEA module.

    Click Next.

    Importing a project from Eclipse as a module
  6. Select the code style configuration that you want to use in the project and click Next.

  7. Click Create.

    The project will appear in the Project tool window as a module.

For more information about modules in IntelliJ IDEA, refer to Modules.

Last modified: 11 October 2024