更新时是否有限制捆绑版本?

发布于 2024-12-07 00:39:37 字数 164 浏览 2 评论 0原文

当我在 OSGi 中使用 update 命令时,框架 (Equinox) 使用更新位置中的文件来更新包。无论该位置中的捆绑包是否具有更高版本。例如,框架将版本 1.2.0 更新为 1.0.0。

是否有办法限制将用作更新文件的文件版本?我的意思是我们可以在导入包中做些什么。

When I use update command in OSGi, the framework (Equinox) uses the file in update location in order to update the bundle. No matter if the bundle in the location has a higher version or not. for example the framework updated version 1.2.0 with 1.0.0.

is there anyway to limit the version of the file that is going to be used as the updated file? I mean something like what we can do in import bundles.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疑心病 2024-12-14 00:39:37

不,框架不会为您进行此类检查。如果您不想从该位置更新包,则不要调用 update 即可。

请注意,可以使用采用 InputStreamupdate 方法版本,从与最初安装位置不同的位置更新包,例如:

File newLocation = new File("...");
bundle.update(new FileInputStream(newLocation));

No, the framework won't do this kind of checking for you. If you don't want to update the bundle from that location, just don't call update.

Note that it is possible to update a bundle from a different location than it was originally installed from, using the version of the update method that takes an InputStream, e.g.:

File newLocation = new File("...");
bundle.update(new FileInputStream(newLocation));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文