A RAR, WAR or EAR file is a standard JAR (.jar) file with a .war or .ear extension. Each archive extension file denotes its purpose. A JAR (Java ARchive) file format is based on the standard ZIP file format with an optional manifest file.
|J2EE Archive Type||File Extension||Module Type|
|Enterprise Archive||EAR||All modules together|
|Java Archive||JAR||Enterprise Bean Module, Application Client module|
|Web Archive||WAR||Web module|
|Resource Adapter||RAR||Ressource Adapter module|
A J2EE archive is composed of:
Using modules and JAR, WAR, EAR files makes it possible to assemble a number of different J2EE applications using some of the same components. No extra coding is needed; it is just a matter of assembling various J2EE modules into Java EE JAR, WAR, or EAR files.
unpack an archive
The following command will unpack the archive in the current directory
jar xvf myArchive.ear
The following command will unpack all ear archive in the current directory
jar xvf *.ear
load dynamically a JAR
search a jar
- See jar search
- https://creadur.apache.org/tentacles/ - Apache Tentacles™ will download all the archives from a staging repo, unpack them and create a little report of what is there.
An EAR file contains:
- Java EE modules
- and, optionally, deployment descriptors.
- the directory META-INF contains the configuration files (deployment descriptors, manifest). META-INF is WEB-INF for a Web module.
The MANIFEST.MF files are created automatically by the JAR utility
An EJB modules contain:
- class files for enterprise beans
- and an EJB deployment descriptor.
EJB modules are packaged as JAR files with a .jar extension.
Application client modules contain:
- class files
- and an application client deployment descriptor.
Application client modules are packaged as JAR files with a .jar extension.
Resource adapter modules contain:
- all Java interfaces,
- native libraries,
- and other documentation,
- along with the resource adapter deployment descriptor.
Resource adapter modules are packaged as JAR files with an .rar (resource adapter archive) extension.