故障现象

Eclipse下OSGi开发,运行测试时,程序直接报错,堆栈信息显示:Could not find bundle: org.eclipse.equinox.console

解决办法

参考资料 : stackoverflow

This is because the default shell of Eclipse has been moved to “Apache Felix Gogo”; so the necessary bundles must be added to the “Run Configuration” before running. Followings are the four bundled that you need to select from the list:
- org.apache.felix.gogo.command_0.10.0v.jar
- org.apache.felix.gogo.runtime_0.10.0v.jar
- org.apache.felix.gogo.shell_0.10.0v.jar
- org.eclipse.equinox.console_1.0.100.jar

解决Eclipse进行OSGI调试时出现Could not find bundle: org.eclipse.equinox.console的问题

解释说明:
根据 stackoverflow 上的解释是:Eclipse下默认的shell已经迁移到“Apache Felix Gogo”之下,所以在OSGi开发时的bundles在执行时,必须在“Run Configuration”中添加必要的依赖bundles,以下4项是必须的:

  • org.apache.felix.gogo.command_0.10.0v.jar
  • org.apache.felix.gogo.runtime_0.10.0v.jar
  • org.apache.felix.gogo.shell_0.10.0v.jar
  • org.eclipse.equinox.console_1.0.100.jar

所以,“Run Configuration”–> “Bundles” –> “Target Platform” –> 勾选以上4个依赖bundles
就OK了

相关文章:

  • 2021-06-29
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-07-25
  • 2021-09-17
  • 2022-12-23
猜你喜欢
  • 2021-07-06
  • 2022-12-23
  • 2022-01-26
  • 2021-11-04
  • 2021-06-16
  • 2021-11-28
相关资源
相似解决方案