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.

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

Public Folder

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