Java与jar之间的区别 [英] Difference between jar and war in Java
问题描述
.jar
与 .war
文件有什么区别?它只是文件扩展名还是还有其他内容?
What is the difference between a .jar
and a .war
file? Is it only the file extension or is there something more?
推荐答案
From Java Tips: Difference between ear jar and war files:
这些文件只是使用java jar工具压缩文件
。这些文件是为不同目的创建的
。这里
是这些文件的描述:
These files are simply zipped files using the java jar tool. These files are created for different purposes. Here is the description of these files:
-
.jar文件:。 jar文件包含
库,资源和
附件文件,如属性文件。
.jar files: The .jar files contain libraries, resources and accessories files like property files.
。 war文件:战争文件包含
Web应用程序,可以在任何servlet / jsp
容器上部署
。 .war文件包含jsp,
html,javascript 以及开发web
应用程序所需的其他文件
。
.war files: The war file contains the web application that can be deployed on any servlet/jsp container. The .war file contains jsp, html, javascript and other files necessary for the development of web applications.
Sun / Oracle官方说明:
- The J2EETM Tutorial: Web Application Archives
- The Java Archive (JAR) File Format: The Basics
维基百科文章:
- WAR file format (Sun)
- JAR file
这篇关于Java与jar之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!