Specifying dependent JAR files or modules

You can use the Java™ EE Module Dependencies page to specify JAR files or modules that are required by a module. The dependencies are defined in the MANIFEST.MF file for your module.

About this task

When you are specifying required JAR files or modules, you first specify the enterprise application (EAR) that your project is a part of. Typically, the project is referenced by one EAR project in the workspace. However, it is possible that you have multiple enterprise applications that contain a reference to the same module or utility JAR project. If so, then ensure that you give the JAR or module the same Uniform Resource Identifier (URI) in each application, so that the class path is valid for all applications.

It is also possible that your module is a standalone project and is not currently referenced by any enterprise application. In this case, since there is no enterprise application scope that is defined, you cannot use the Manifest editor to update the dependencies. To add the module to an enterprise application, see Adding modules to an enterprise application.

Procedure

  1. In the Enterprise Explorer view of the Java EE perspective, right-click your project file and select Properties. On the Properties page, select Deployment Assembly. If you have a deployment descriptor, you can also open Deployment Assembly by clicking the Manage Utility Jars link on the deployment descriptor page.
  2. Click OK.

Results

Tip: If you need to compile against a server runtime JAR files during development, you do not need to add these JAR files as dependent JAR files. The workbench manages this by using the target server property for the project. The workbench adds the appropriate libraries to your project's build and class path that is based on the target server. For more information, see Specifying target servers for J2EE projects.

Feedback