Create war file in command prompt
How to create a war file in the command prompt.
You can follow the directions below for Windows command prompt or for the Mac OSX terminal.
To compress a “michael” Java web application into a web archive file named michael.war. Follow these steps.
Prerequisites
- J2SE installed, with jar in your environment path.
- Open the command prompt and cd to your directory that you want to archive.
<tomcat_home>\webapps\michael
- Use the Java Archive Command “jar” to bundle up the application
- After finishing, you will see a michael.war file in that directory.
jar -cvf michael.war *
Recommended Book
One of the books I highly recommend is Clean Code. It's Java centric but has helped me throughout my professional career. The book is still sitting on my bookshelf.