In J2EE, application modules are packaged as EAR, JAR and WAR based on their functionality .These files are simply zipped files using java jar tool. These files are created for different purposes.
JAR files (Java ARchive) allows aggregating many files into one, it is usually used to hold Java classes in a library. i.e. Math.jar These files are with the .jar extension. The .jar files contain the libraries, resources and accessories files like property files.
EAR files (Enterprise ARchive) combines JAR and WAR files to make a combined archive for Enterprise Applications. The .ear file contains the EJB modules of the applications.