JAR组件与EAR有何不同? (应用服务器)

时间:2017-08-19 09:45:53

标签: java-ee jar glassfish ejb ear

相对于JAR的{​​{1}}和EAR文件之间的distinction是什么? Glassfish帮助说:

EJB

...

thufir@doge:~$ 
thufir@doge:~$ GlassFish_Server/bin/asadmin deploy --help

那么 --type The packaging archive type of the component that is being deployed. Possible values are as follows: car The component is packaged as a CAR file. ear The component is packaged as an EAR file. ejb The component is an EJB packaged as a JAR file. osgi The component is packaged as an OSGi bundle. rar The component is packaged as a RAR file. war The component is packaged as a WAR file. 可以打包为EJB文件吗?有什么功能区别?具体而言,JAR 不能EAR组件可以做什么?

1 个答案:

答案 0 :(得分:1)

EAR - Ear文件基本上用于包含完整的企业应用程序。它包含构成特定Java EE应用程序的所有组件。企业应用程序被定义为.jar文件,资源,类和多个Web应用程序的集合

JAR - Java Archives(JAR)JAR文件封装了一个或多个Java类,清单和描述符。 Jar文件基本上用于保存Java类,资源等的通用库。此外,JAR文件是最低级别的存档。 JAR文件在Java EE中用于打包EJB和客户端Java应用程序。