aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Difference b/w .jar, .ear, .war ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Difference b/w .jar, .ear, .war ?" Watch "Difference b/w .jar, .ear, .war ?" New topic
Author

Difference b/w .jar, .ear, .war ?

SJ Rao
Greenhorn

Joined: Mar 05, 2003
Posts: 25
Can someone please tell me the exact difference b/w .ear, .jar & .war ?
& under what circumstances should a application have these files ?

One of my application has a .ear file & an other application doesnt have. Both applications use framework which is based on MVC architecture.

So can someone tell me when do we deploy .ear file ?
Kripal Singh
Ranch Hand

Joined: Jul 26, 2001
Posts: 254
war jar and ear are j2ee components .
read more about them here

http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Front.html

and here

http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Overview6.html


# Help an unprivileged kid.<br /> Whatever u do will make a difference...<br /> ...to a child's life & ur own #<br /><a href="http://www.cry.org/" target="_blank" rel="nofollow">www.cry.org/</a>
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Hi

Jar files are Standard Java archive for storing Java classess or source file / any kind of resource for a formal application or library /frameworks


WAR files are Web archive which have a web.xml and some folders like web-inf inside it ,War file are standard for deploying in web application container like Tomcat , Resine ,Jetty...
you can include more folders , files into WAR files as you need
inside a WAR's web-inf you have Standard folders to store your JAR files.


and finally EAR files
which are Standard files extension for Java Enterprise Archive.
these files are deployable in J2ee containers like Jboss ,Oracle AS ,Websphere , Sun one....
an EAr file could containe several jar and WAR files.

All this file extension are compatible with Zip format.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Difference b/w .jar, .ear, .war ?