0

为什么发布 EAR 时需要在 MANIFEST 文件中声明所有 JAR 名称?类路径应该不够吗?

4

1 回答 1

1

If you have an application in an EAR file, it is desireable that the application have its own classpath, independent of other applications on the server. If the classpath for the server was used for all applications, that could force all of them to use the same versions of all jars they needed, which would be a maintenance nightmare. If the application needs to use a set of jars that are specific to that application, the manifest file is the logical place to put them.

于 2013-03-08T10:44:53.210 回答