1

如何读取只有 JAR 文件名但不安装或激活它的包清单?

我需要动态安装捆绑包,但是当我尝试安装具有相同名称和版本的捆绑包时,即使它们具有不同的源文件,也会产生问题。

4

2 回答 2

2

也许创建JarFile并使用JarFile.getManifest读取清单元素?

于 2011-07-11T16:56:22.587 回答
1

Though not directly answering your question, version 4.3 of the specification does allow multiple installations of bundles with the same symbolic name and version as long as the org.osgi.framework.bsnversion property is set to multiple. I have no direct experience using it, it's just something I noticed while reading the spec.

See in particular section 4.4.1 Bundle Identifiers.

于 2011-07-11T17:54:25.073 回答