Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
SJ Rao
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic