Eliminating duplicate jar files

This task is optional in setting up your J2EE runtime environment. The advantage to doing this task is that you will save space. If you place multiple J2EE modules into a single EAR project, eliminate the duplicate JAR files as follows:
  1. Move a copy of each duplicate JAR file to the top level of the EAR project.
  2. Delete the duplicate JAR files from the J2EE modules.
  3. Make the JAR files accessible to all modules in the EAR by doing as follows:
    1. Right-click on the EAR project in the Project Explorer.
    2. Select J2EE Module Dependencies from the context menu.
    3. Click Add JARs and select the JAR files. Click OK to finish.
  4. Ensure that the build path for each of the affected J2EE modules points to the JAR files in the EAR; specifically, follow these steps for each of those J2EE modules:
    1. Right-click on the module in the Project Explorer.
    2. Select J2EE Module Dependencies.
    3. When the Module Dependencies dialog is displayed, select the JAR files to access from the top level of the EAR, then click OK.

Feedback