Creating and configuring Java EE projects using wizards

You can use wizards to create Java™ EE projects in your workspace.

Before you begin

If you do not see the Java EE icon, J2EE perspective icon, in the top right tab of the workspace, you need to switch to the Java EE perspective.

Procedure

  1. To use the Java EE wizard from the menu bar, select File > New, and select the type of enterprise application you want to create:
    • Enterprise Application Project
    • Web Project
    • EJB Project
    • Connector Project
    • Application Client Project
    To create Utility projects, select File > New > Project ... > Java EE > Utility Project. To create Web fragment projects, select File > New > Project ... > Web > Web Fragment Project . Click Next.
  2. In the Project Name field, type a name for your project.
  3. In the Target runtime field, select your target runtime, or click New to create a new runtime.
  4. In the <module-type> Module version field, you can accept the default value or change the module version number. This field controls the primary facet version for your project. The available versions are filtered based on the target runtime that you selected in the Target runtime field. If the target runtime is WebSphere® Application Server version 7.0, then the web project versions available are versions 2.2, 2.3, 2.4, and 2.5. If the target runtime is WebSphere Application Server version 8 or 8.5, then the web project versions available are versions 2.2, 2.3, 2.4, 2.5, and 3.0. The module version here is like clicking Modify... beside the Configuration field.
  5. In the Configuration field, you can accept the default configuration, select a pre-defined project configuration from the Configurations drop-down list, or click Modify... to change the facets for your project.

    Modify configuration

    If you plan to create JPA entities in the EJB 3.1 project, for example, select Java Persistence. Save this configuration with a meaningful name, for example, EJBDevelopmentWithJPA so that you can reference this configuration in any EJB 3.1 projects that are subsequently created.

    1. Select one or more project facets from the Project Facets list.
    2. To specify server runtime environments, click Runtimes and select one or more runtimes.
    3. After making your selections, you can save your custom configuration by clicking Save.
  6. Optional: Select Add project to an EAR module in the EAR Membership field to add the new module to an enterprise module (EAR) project. Type a new project name or select an existing enterprise module project from the drop-down list in the EAR Project Name combination box. Or, click New to launch the New EAR module Project wizard.
  7. In the Content Directory: field, specify a folder for your project files. The project validator checks to ensure that project conforms to the following guidelines:
    • The root folders of the project may not have linked resources.
    • Must have only one output folder.
    • If the output folder is a Java source folder, then it must map to the root folders
    The default for single rootedness problems is set to warning. To change this setting, select Window > Preferences > Validation > Project Structure Validation. Click the ... settings field, and select
    1. Error
    2. Warning
    3. Ignore
    Validator preferences
  8. Click Next to continue defining your enterprise project, or click Finish.

Feedback