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:
- Move a copy of each duplicate JAR file to the top level of the EAR project.
- Delete the duplicate JAR files from the J2EE modules.
- Make the JAR files accessible to all
modules in the EAR by doing as follows:
- Right-click on the EAR project in the Project Explorer.
- Select J2EE Module Dependencies from the context menu.
- Click Add JARs and select the JAR files. Click OK to finish.
- 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:
- Right-click on the module in the Project Explorer.
- Select J2EE Module Dependencies.
- When the Module Dependencies dialog is displayed, select the JAR files to access from the top level of the EAR, then click OK.