Java Interview Questions: – Can you explain difference EAR, JAR and WAR file?

Following is the differences between EAR, JAR and WAR file asked during Java Interview Questions.

JAR: – EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extension

WAR: – Web modules which contains Servlet class files, JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war( web achive) extension

EAR: – All above files(.jar and .war) are packaged as JAR file with .ear ( enterprise archive) extension and deployed into Application Server

SAR (Service ARchive): –  It provides a service.xml file and accompanying JAR files. And used in case of SOA

APK (Android Application Package):- A variant of the Java archive format, is used for Android applications

See the following video on Java – Inheritance between beans and spring asked during java Interview:

Click for more Java interview questions


Visit for more author’s blog on Java interview questions


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s