There are many technical differences between a Jar File, War File and EAR File in JAVA. This tutorial tries to explain some of them:

JAR File:

Jar file (file with a .jar extension) is the normal Java Application archive and intended to hold generic libraries of Java classes, resources, auxiliary files, etc  It is added in the  classpath of Java Programms and are used in running java applications. For eg. ojdbc5.jar is used to connect to Oracle Databases

WAR File:

War files (files with a .war extension) are intended to contain complete Web applications. In this context, a Web application is defined as a single group of files, classes, resources, .jar files that can be packaged and accessed as one servlet context. War file consists of Servlet class files,JSP Files,supporting files, GIF and HTML files

EAR File:

All above files(.jar and .war) are packaged as JAR file with .ear ( enterprise archive) extension and deployed into Application Server. an enterprise application is defined as a collection of .jar files, resources, classes, and multiple Web application.


Sandeep Joshi
Mathematics, Technology and Programming are my passion. I am a part of Java Ecosystem and through this blog, I contribute to it. I am here to blog about my interests, views and experiences.
I am on Google+ and Facebook.
I feel proud to be listed as a "National Memory Record Holder" in the Limca Book of Records, 2009 and have attempted for an International Memory record in the Guiness Book of Records. I can remember the value of PI upto 10,000 digits after the decimal (3.1415.....). You can contact me on ; I would like to hear from you :)