Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the difference between war, jar & ear

 
Chiran Mathur
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please explain
 
Hakan Akkaya
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
i think you know what a jar file is . A war file is a web application file and a ear file is a enterprise archive file.
you should use that, when you are deploying e.g a webservice .There you must deploy a Ear file '(contains a jar file and a war file) and usually all the other files are automatically deployed.
Hope this helps
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a Jar (java archive) file is set of java classes ,property files packaged together that is usually a library or a standart program.
a war (web archive ) file is a set of file that represent a web application. You can find in it the structure of a web application.
So you can find jsp,html,gif,.........and servlet classes as well as the descriptor.
the last one is a J2EE application archive with jar file for EJB and a war file for the web application
------------------
Benjamin l´┐Żonard
www.evisor.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic