top of page

Difference between JAR and WAR files in Java


#

JAR

WAR

1.

​Stands for Java ARchive

Stands for Web application ARchive

2.

Contain libraries, resources and accessories files like property files.

Used to combine JSPs, servlets, Java class files, XML files, Javascript libraries, JAR libraries, static web pages, and any other resources needed to run the application.

3.

Contains .class file, manifest file and application resources like images, sound clips, and security certificates

Contains html, js, css, .class, jsp and servlets pages

4.

Used for working with any kind of application

Used for working on web applications

5.

To execute a JAR file, simple JDK is enough.

To execute a WAR file, a Web server or Web container is required, for example, Tomcat/ Weblogic/ Websphere/ Jetty/ GlassFish

Conclusion

The main difference between JAR and WAR Files is their content. The JAR files are the files that have Java class files, associated metadata and resources aggregated into a single file to execute a Java application. Whereas, the WAR files are the files that contain Servlet, JSP, HTML, JavaScript and other files necessary for developing web applications.

Recent Posts

See All

Comments


MiIT Logo

Company

Contact Us

905-487-4880 

5160 Explorer Dr #34, Mississauga,ON L4W 4T7

646-713-5711

4466 Buttonwood Ln Lilburn, GA 30047

262 Chapman Rd, STE 240 Newark DE 19702

Stay up to date on the latest from MiIT

  • Instagram
  • Facebook
  • http://linkedin.com/company/miittechnologies/about/
  • Whatsapp

© All Content MiIT Technologies Inc.2019 - 2024. All rights reserved.

bottom of page