Could not find bundle: org.eclipse.equinox.console

1. 创建一个plugins 工程

 

 

2. 

 

 

3. 创建完的工程,右键运行

 

 4. 可能会报错,因为eclipse里面有很多插件,如果只关心osgi的话,可以只添加osgi相关的插件即可。首先对工程运行的进行配置,右键Run As > Run configurations...

 

 

 

注意,osgi现在可能会依赖其他的组件,只添加osgi会报错,如果报Could not find bundle: org.eclipse.equinox.console

将这些插件也勾上即可

 

org.eclipse.equinox.console

org.apache.felix.gogo.command

org.apache.felix.gogo.runtime

org.apache.felix.gogo.shell

 

保存再通过 OSGI Framework运行,就跑起来了

 

posted @ 2022-08-17 16:00  jason_bo  阅读(159)  评论(0)    收藏  举报