Create .WAR file in Command Prompt

August 27, 2012 — 5 Comments

To compress a “michael” web application into a web archive file named michael.war. Follow these steps.


  • J2SE installed, with jar in your environment path.
    1. Open the command prompt and cd to your directory that you want to archive.
    2. Use the Java Archive Command “jar” to bundle up the application
    3. jar -cvf michael.war *
    4. After finishing, you will see a michael.war file in that directory.


Posts Twitter Facebook

My name is Michael Le, and I am a web developer.

5 responses to Create .WAR file in Command Prompt

  1. man i did this and my tomcat stopped working

  2. try this…
    jar -cvf “michael.war” *

  3. I want only foldfers content not folder name in my war file

  4. what is the meaning cvf

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.