• jar war


    区别:Jar、war、EAR、在文件结构上,三者并没有什么不同,它们都采用zip或jar档案文件压缩格式。但是它们的使用目的有所区别:

      Jar文件(扩展名为. Jar,Java Application Archive)包含Java类的普通库、资源(resources)、辅助文件(auxiliary files)等

      War文件(扩展名为.War,Web Application Archive)包含全部Web应用程序。在这种情形下,一个Web应用程序被定义为单独的一组文件、类和资源,用户可以对jar文件进行封装,并把它作为小型服务程序(servlet)来访问。

      Ear文件(扩展名为.Ear,Enterprise Application Archive)包含全部企业应用程序。在这种情形下,一个企业应用程序被定义为多个jar文件、资源、类和Web应用程序的集合。

      每一种文件(.jar, .war, .ear)只能由应用服务器(application servers)、小型服务程序容器(servlet containers)、EJB容器(EJB containers)等进行处理。

    EAR文件包括整个项目,内含多个ejb module(jar文件)和web module(war文件)

    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 files: The .jar files contain libraries, resources and accessories files like property files.

    • .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.

    .jar and .war are both zipped archived files. Both can have the optional META-INF/MANIFEST.MF manifest file which hold informative information like versioning, and instructional attributes like classpath and main-class for the JVM that will execute it.

    .war file - Web Application Archive intended to be execute inside a 'Servlet Container' and may include other jar files (at WEB-INF/lib directory) compiled classes (at WEB-INF/classes (servlet goes there too)) .jsp files images, files etc. All WAR content that is there in order to create a self-contained module.

  • 相关阅读:
    java 基本数据类型
    public 类、default 类、内部类、匿名内部类
    使用jar命令打jar/war包、创建可执行jar包、运行jar包、及批处理脚本编写
    jdk下载及安装
    数据库常用查询
    数据库锁的几种类型
    ORACLE表批量迁移表空间
    如何区分Oracle的数据库,实例,服务名,SID
    ORACLE下如何获得全部的索引创建语句
    oracle 内存分配和调优 总结
  • 原文地址:https://www.cnblogs.com/diegodu/p/5950580.html
Copyright © 2020-2023  润新知