Difference between jar and war in Java Difference between jar and war in Java java java

Difference between jar and war in Java


From Java Tips: Difference between ear jar and war files:

These files are simply zipped files using the java jar tool. These files are created for different purposes. Here is the description of these files:

  • .jar files: The .jar files contain libraries, resources and accessories files like property files.

  • .war files: The war file contains the web application that can be deployed on any servlet/jsp container. The .war file contains jsp, html, javascript and other files necessary for the development of web applications.


Official Sun/Oracle descriptions:


Wikipedia articles:


WAR stands for Web application ARchive

JAR stands for Java ARchive

enter image description here


A .war file has a specific structure in terms of where certain files will be. Other than that, yes, it's just a .jar.