What is the EAR file format?
An .ear file is the top-level packaging unit for Java enterprise applications, defined by the J2EE specification (now Jakarta EE) since its 1.2 release in December 1999. Structurally it is a ZIP archive, sharing the PK magic bytes 50 4B 03 04, that bundles together web modules (.war), EJB modules (.jar), resource-adapter modules (.rar), and application client JARs into one deployable artifact.
The mandatory META-INF/application.xml deployment descriptor identifies the archive as an EAR and declares which sub-modules it contains. Per-entry compression uses DEFLATE; individual entries may also be stored uncompressed. Because the container is standard ZIP, renaming the file to .zip and opening it with any archive manager exposes all internal structure.
EAR files are deployed to full Jakarta EE application servers - WildFly (JBoss), Eclipse GlassFish, IBM WebSphere, and Oracle WebLogic being the most common targets. Modern microservice architectures favor executable fat-JAR files or container images over EARs, but EAR deployment remains the standard for full Jakarta EE workloads and large legacy Java EE applications. The underlying ZIP-based layout has been stable since the original J2EE 1.2 specification; versioning is expressed through application.xml namespace declarations.
Security & safety
RISK: MEDIUMAn EAR contains executable server-side code that runs on the application server with that server's privileges. Deploy only EARs from trusted sources. A malicious EAR can contain web shells, backdoored EJBs, or exploit vulnerable bundled libraries. Inspect contents with 7-Zip before deploying an untrusted EAR. Keep the application server and bundled libraries patched.
Format details
in a nutshell- Audacity audio file - Some older Audacity sessions may be exported with .ear; entirely unrelated to Java EE.
Programs that open EAR files
Technical details
deep spec| Container format | ZIP archive (same `50 4B 03 04` magic bytes as `.zip` and `.jar`) |
| Byte order | Little-endian (ZIP format) |
| Compression | DEFLATE per entry; STORED also permitted for individual entries |
| Mandatory descriptor | `META-INF/application.xml` - identifies the EAR and declares its sub-modules |
| Sub-module types | `.war` (web), EJB `.jar` (enterprise beans), `.rar` (resource adapters), application client `.jar` |
| Version declaration | `application.xml` XML namespace URI identifies J2EE 1.x / Java EE 5-8 / Jakarta EE 8-11 version |
| Integrity check | ZIP per-entry CRC-32; optional JAR code signing via `META-INF/` signature blocks |
| Max entries | 65,535 (standard ZIP); unlimited with ZIP64 extension |
| Typical file size | 5 MB - 500 MB |
| MIME type | `application/java-archive` |
| Inspection method | Rename to `.zip` to browse all contents with any archive manager (e.g. 7-Zip) |
| Deployment targets | WildFly, Eclipse GlassFish, IBM WebSphere, Oracle WebLogic |
| Released | 1999 (J2EE 1.2 specification) |
| Latest version | Tracks Jakarta EE specification (Jakarta EE 11, 2024); EAR layout itself is stable |
| Open standard | Yes · royalty-free |
| Specification | jakarta.ee |
EAR conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about EAR files.