java package and the difference jar of war

jar and war package, are designed to deploy and publish the project, the project package, with the deployment of packaged tea when, on the inside with information about the deployment of (the code and dependencies into a single compressed file in the compiler can be used directly , eg: tomcat first extract, compile, drawback is that with the increase in the file, slow start)

Same point:

  1. Are compressed files, extract the files can be decompressed with

difference:

  1. war is javaweb play package, jar is playing java package
  2. Java jar project only used to write the package, there is only the class files compiled and deployed documents cited in the next stall number of classes and resources packaged into a single package, to facilitate the program; WAR class includes the code is compiled file, depending on the package configuration file, all site pages, (html, jsp ==), can be understood as a web project inside everything.

Guess you like

Origin blog.csdn.net/shaonianzhi/article/details/92569753