pTutorial

New way to learn Programming

How to create a java war file

How to create war file without using any IDE.

As I discussed earlier about WAR file and how to create war file in previous sections. In this section we will discuss about "How to create war file in CMD (Command Prompt)" with the help of example.

Steps for creating WAR file in CMD

Step 1: First you have to create a web application with proper directory structure.

Step 2: Open CMD (Command Prompt). Press Window +R and type cmd.


How to create a java war file

Step 3: Just navigate the public folder. A folder that containing WEB-INF folder is known as public folder. See the public folder below.

Steps for creating WAR file in CMD

Public Folder

war file tutorial

Step 4: Type jar cf war_file_name.war * .* and press enter

jar cf hello.war *.*
How To Create A Java War File In CMD

You can see the hello.war file in the Same folder. As seen below:

java war file tutorial

QUOTES OF THE DAY

A good beginning makes a good ending.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER