Rational: Add project utility JAR files
One can add existing Java projects to enterprise applications as utility JAR files. For each utility Java project that you add to the enterprise application, a <utilityJARMappings> element is defined in the .modulemaps file in the META-INF folder.
Shortcuts for adding modules or utility JAR files to an enterprise application:
- Drag a project from the Project Explorer view and drop it on the Modules or Project Utility JARs section of the Application Deployment Descriptor editor.
- Within the Project Explorer view, drag a project and drop it on the Modules or Project Utility JARs folder under the deployment descriptor for the enterprise application.
To add utility JAR files to the enterprise application:
- In the Project Explorer view of the J2EE perspective, right-click the Deployment Descriptor for your enterprise application project and select...
Open With | Deployment Descriptor Editor...to open the Application Deployment Descriptor editor.
- In the Project Utility JARs section of the Module page of the editor, click Add. The Add Utility JAR wizard appears.
- Select one of the projects from the list.
- Click Finish.
- If the target server specified for the project is different from the target server specified for the enterprise application, the Change Target Server dialog opens. Click Yes to update the target server for the project to be the same target server specified for the enterprise application.
To remove a utility Java JAR file from the enterprise application, select the JAR file from the list of utility JAR files, and click Remove.
Related concepts
Application Deployment Descriptor editor