cancel
Showing results for 
Search instead for 
Did you mean: 

EAR Packaging

Former Member
0 Kudos

Hi,

I have 5 jar files which are using in Ejb project and also in Web project. I put these files in Lib folder of both projects and also set the build path.

I want to put these 5 jar files only once in EAR project and then use Ejb project and Web project from EAR at developnent time and runtime.

Please guide me how i pack the EAR file with these 5 jar files.

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Before building an EAR file for a J2EE application, the EJB-JARs and the WARs that will be packaged in the J2EE application must be built and the XML deployment descriptor (application.xml) must be written.

Then, the EAR file (<j2ee-application>.ear) can be built using the jar command:

cd <your_j2ee_application_directory>

jar cvf <j2ee-application>.ear *

Regards,

Sunaina Reddy T

former_member192434
Active Contributor
0 Kudos
Former Member
0 Kudos

hi,

which j2ee version do you use?

In J2EE 5 you can create a folder called lib at the toplevel of your EAR and you can put all your additional libraries into this folder. I am not sure but I think this is part of the j2ee specification.

Regards

Michael

Former Member
0 Kudos

Hi,

If you are working at Development Component then you can ctreate an external library DC and then create dependency on this external library DC for your further projects.

If you are working locally then after setting the build path, it will itself get packaged in the ear.

Regards.

Rajat