【问题标题】:osgi.configuration.area.readOnly=true gives NoClassDefFoundErrorosgi.configuration.area.readOnly=true 给出 NoClassDefFoundError
【发布时间】:2010-11-24 15:07:45
【问题描述】:

如果我在 config.ini 中输入 osgi.configuration.area.readOnly=true,当我启动 Eclipse RCP 时,我会从我们导入的库之一收到 NoClassDefFoundError。

基于this question,我知道这是由于我们的嵌套罐子需要配置区域来解压。但是没有办法确保这发生在我们的osgi.instance.area 或其他地方吗?

是的,我可以确保取消嵌套嵌套的 jar,但这感觉像是一种解决方法,下次我们添加新的 lib 依赖项时可能会失败。

config.ini 文件:

eclipse.application=(myApp)
osgi.bundles.defaultStartLevel=4
eclipse.product=(myProd)
osgi.splashPath=platform:/base/plugins/(rcp)
osgi.bundles=(cut list)
osgi.instance.area=@user.home/.myApp
osgi.locking=none
osgi.configuration.area.readOnly=true

【问题讨论】:

  • 使用 '-console -noExit' 启动春分。然后使用 'ss'、'diag' 来跟踪您的包是否已安装/已解决。
  • 为什么你希望你的配置区域是只读的? OSGI 需要将数据写入该位置对吗?
  • @DuncanKrebs 这是前段时间,但 iirc 我正在尝试共享 Eclipse 安装,很多人都可以使用相同的安装。要使其正常工作,安装它的目录必须对非 root 用户是只读的。

标签: eclipse osgi


【解决方案1】:

一个老问题,但我遇到了同样的问题。 您可以在 config.ini 文件中添加“osgi.configuration.area.default={location}”来管理您希望 OSGI 放置嵌套 jar 的位置。

有关更多信息,请参阅此主题:Eclipse RCP: How is the default name of the private configuration directory (created in ~/.eclipse when using a shared install) constructed?

【讨论】:

    猜你喜欢
    • 2018-08-14
    • 2019-04-16
    • 1970-01-01
    • 2012-04-17
    • 2021-10-27
    • 2016-03-06
    • 1970-01-01
    • 1970-01-01
    • 2022-01-13
    相关资源
    最近更新 更多