Importing an enterprise application EAR file

Enterprise application projects are deployed into EAR files. You can import an enterprise application project by importing it from a deployed EAR file.

You can also choose to import utility JAR files as utility Java™ projects. You can also use the wizard to change the new project names for the EAR file and modules that will be imported.

To import an EAR file using the wizard:

  1. In the J2EE perspective, click File > Import. The Import window opens.
  2. Click EAR file.
  3. Click Next.
  4. Specify the following general options for the EAR import:
    1. EAR file: Enter the full path for the EAR file that you want to import. You can click Browse to select the EAR file from the file system.
    2. EAR project: type a name for the enterprise application project that will be created when you import the EAR file.
    3. Target runtime: Select the application server that you want to target for your development. This selection affects the runtime settings by modifying the class path entries for the project.
  5. Click Next, and complete the following steps:
    1. On the Enterprise Application Import page, select any utility JAR files from the project that you want to import as utility projects.
    2. In the Module Root Location field, specify the root directory for all of the projects that will be imported or created during import.
  6. Click Next.
  7. On the EAR Module and Utility JAR Projects page of the wizard, select the projects that you want to import with the EAR file. Also, you can edit the new project name for each module and utility project to be imported.
    Tip: The selection buttons on this page can help you select the projects to import when you are importing for partial EAR development. For example, if you are importing to a workspace where some projects are attached to a repository and other projects are in binary form, these buttons help you make the proper selections for which projects to import:
    • Select New: Selects the projects that are currently not in your workspace.
    • Select All: Selects all projects for import.
    • Deselect All: Clears all module and utility projects for import.
  8. Click Finish to import the contents of the EAR file.
Related concepts
J2EE architecture
Enterprise application projects
Cyclical dependencies between J2EE modules
Related tasks
Exporting an enterprise application into an EAR file
Correcting cyclical dependencies after an EAR is imported