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.
- J2SE installed, with jar in your environment path.
- Open the command prompt and cd to your directory that you want to archive.
- 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 *
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.