Creating an enterprise application project

Using the wizard to create an enterprise application project allows you to package many web applications and modules in a project and deploy these modules as a J2EE enterprise application.

Enterprise application projects contain references to the resources needed for enterprise applications and can contain a combination of Web modules, JAR files, connector modules, EJB modules, and application client modules. An enterprise application project is deployed in the form of an EAR file, and is therefore sometimes referred to as an EAR project. The modules in an enterprise application project are mapped to other J2EE projects. The mapping information is stored in metadata files within the enterprise application project. The metadata files are used for exporting the project to an EAR file and for running the project on the server.

Like the other types of projects, enterprise application projects can contain one or more project facets, which represent units of functionality in the project. To be deployed as an EAR file, the new project must have the EAR facet. Depending on what you want to use the project for, you may want to enable other facets for the project.

When you create an enterprise application project, it is recommended that you do not give it a name that contains double-byte character set (DBCS) characters.

To create a J2EE enterprise application project, complete the following steps:

  1. In the Java™ EE perspective, click File > New > Project.
  2. In the New Project Wizard, select J2EE > Enterprise Application Project and click Next.
  3. In the Project Name field, type a name for the new project.
  4. Optional: To change the default project location, clear the Use default check box under Project contents and select a new location with the Browse button.
  5. In the Target runtime field, select the target runtime for the project. You can click the New button to create a new runtime for the project to use.
  6. Optional: To use a predefined configuration for your project, select a configuration in the Configuration list. You can click the Modify button to do the following:
    • Customize project facets. Select the check boxes next to the facets you want the project to have and select a version number for each facet. Select a facet name to see more information about that facet in the Details tab. You can also choose a preset combination of facets from the Configurations list.
    • Limit your project to be compatible with one or more runtimes. Click the Show Runtimes tab and select the runtimes that you want the project to be compatible with.
    Click Next.
  7. On the J2EE Modules to Add to the EAR page of the wizard, select the existing modules that you want to add to the new enterprise application project.
  8. Optional: To create new modules to add to the project, click the New Module button to do one of the following:
    Option Description
    Creating one module Clear the Create default modules check box, select the type of module you want to create, click Next and follow the New Project wizard for that type of project.
    Creating two or more modules Select the Create default modules check box, select the check boxes for each type of project you want to create, and click Finish.
    You can enter a name for each module. Each of these modules will have the default settings for that type of project and they will have the same server target as the new enterprise application.
  9. Click Finish.

Related concepts
J2EE architecture
Enterprise application projects
Project facets
Related tasks
Importing an enterprise application EAR file
Exporting an enterprise application into an EAR file