What is Jar War and Ear files in Java

In this tutorial we see what is Jar , War and Ear files in Java enterprise development, and also see what is the difference and usage of these files.

What is Jar ?

How to Create Jar file ?

 

In above jar command we are creating test.jar which have HelloWorld.class file.

For more info on jar command visit Oracle site.

 What is WAR ?

How to Create War file ?

 

Here we are creating Test.war  and  * indicates it will include all the files and sub folders in the current directory .

What is EAR ?

How to Create Ear file ?

 

Here I have discussed how to create Jar , War, and Ear files in command prompt but there are lot of deployment tools available in the market for example IDEs like Eclopse IDE, Netbeans…etc and scripting tools Ant , Maven , Ivy ….etc, so based on the project scope we will use respective tool to create our project binaries and deploy corresponding servers.

 

 

 

Posted in InterviewQuestions and tagged , , .

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *