| Feature | | WAR (Web Application Archive) | | :--- | :--- | :--- | | Purpose | General purpose libraries and applications. | Specifically for Java Web Applications. | | Structure | Standard package structure. | Strict structure (e.g., WEB-INF , web.xml ). | | Execution | Run on the JVM directly or used as a library. | Must be deployed inside a Servlet Container (Tomcat, Jetty). |
The JAR format is a cornerstone of Java deployment — simple, well-supported, and highly practical. For modern Java projects, it remains the standard delivery mechanism, especially when combined with dependency management and containerization. java archive
Run the command: mvn package . This creates a JAR in the target/ folder. | Feature | | WAR (Web Application Archive)