• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

What are ear,war and jar files ?

 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EAR is enterprise archive file

WAR is webarchive file

JAR is javaarchive file. I would like to know the difference between WAR and JAR. Can i say WAR is nothing but JAR in zip format ?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jose chiramal wrote:Can i say WAR is nothing but JAR in zip format ?


No, that's not where the difference is. EAR, WAR and JAR files are all essentially just JAR files, but in EAR and WAR files there are some special configuration files stored inside the EAR or WAR, which a Java EE application server or servlet container uses to deploy the application inside the EAR or WAR.
 
Sheriff
Posts: 22849
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jose chiramal wrote:Can i say WAR is nothing but JAR in zip format ?


Jesper is right. In fact, JAR is just the same. All are just ZIP files with special files and folders inside. For JAR that is the META-INF folder and the META-INF/MANIFEST.MF file. WAR files have these as well, and add the WEB-INF folder and WEB-INF/web.xml file. No idea about EAR but like WAR it's a JAR file with extra files and folders.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition to what Rob mentioned, EAR files assemble the WAR, JAR and other similar component artifacts together. So typically inside and .ear file, you will see a .war and .jar files. A .ear file can also have a META-INF/application.xml.
 
jose chiramal
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does META-INF have can i say the version number or sthg??


Application.xml has the context root etc right ?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Files such as WEB-INF/web.xml and META-INF/application.xml are deployment descriptors - files that contain the configuration of web applications and enterprise applications. If you want to know exactly what those files look like, then look at the schemas and DTDs for them.

Also see the Java EE 6 Tutorial.
 
reply
    Bookmark Topic Watch Topic
  • New Topic