Java Extenions
File Type | Full Name | Primary Use | Contents | Typical Extension |
---|---|---|---|---|
JAR | Java Archive | Stand-alone applications or libraries | - Java class files - Associated metadata - Resources (text, images) |
.jar |
WAR | Web Application Archive | Web applications | - Servlets - JSP files - Java class files - Static web pages (HTML, CSS, JS) - Web resources - Web deployment descriptor (web.xml) |
.war |
EAR | Enterprise Application Archive | Enterprise applications | - Multiple JAR files - Multiple WAR files - Enterprise JavaBeans - Application clients - Resource adapters - Application deployment descriptor (application.xml) |
.ear |
Additional Notes:
- JAR files can be executed directly if they contain a main class.
- WAR files are deployed to Java EE-compliant web servers like Tomcat or Jetty.
- EAR files are deployed to full Java EE application servers like WildFly or WebSphere.
- All these archive types are essentially ZIP files with a specific structure and can be examined using standard ZIP tools.