搭建简单的OSGI的hello world
来源:互联网 发布:什么软件可以下载图片 编辑:程序博客网 时间:2024/05/22 05:30
OSGI项目的搭建
一.项目搭建
1.新建工程的时候选择插件工程。
2.选择 an OSGi framework:Equinox
3.选择一个Available Template: Hello OSGi Bundle
4.项目新建完成。
二.配置运行环境
在Run Configurations中选择Bundles
在Target Platform中选择下面的配置项:
org.eclipse.equinox.console
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
三.启动环境
选择运行刚才配置的启动环境,系统控制台将输出
“Hello World!!
osgi>
”输入ss查看当前多启动的Bundle包
控制台的输出如下:
id State Bundle
0 ACTIVE org.eclipse.osgi_3.9.1.v20140110-1610
2 ACTIVE osgi02_1.0.0.qualifier
3 ACTIVE org.apache.felix.gogo.runtime_0.10.0.v201209301036
4 ACTIVE org.eclipse.equinox.console_1.0.100.v20130429-0953
5 ACTIVE org.apache.felix.gogo.shell_0.10.0.v201212101605
6 ACTIVE org.apache.felix.gogo.command_0.10.0.v201209301215
四.简单的控制台操作
1.ss:查看当前运行中的bundles包,该功能包含查看bundle序号,状态,名字
2.stop x:停止当前运行中的序号为X的bundle包
3.start x:启动ss所查看的序号为x的bundle包。
五.注意事项
在使用控制台停止某个bundle的时候,一定需要看清楚,是不是系统的bundle,
如果不想系统关闭,下面这些bundle不能随意停止,否则就会停止服务:
org.eclipse.equinox.console
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
一.项目搭建
1.新建工程的时候选择插件工程。
2.选择 an OSGi framework:Equinox
3.选择一个Available Template: Hello OSGi Bundle
4.项目新建完成。
二.配置运行环境
在Run Configurations中选择Bundles
在Target Platform中选择下面的配置项:
org.eclipse.equinox.console
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
三.启动环境
选择运行刚才配置的启动环境,系统控制台将输出
“Hello World!!
osgi>
”输入ss查看当前多启动的Bundle包
控制台的输出如下:
id State Bundle
0 ACTIVE org.eclipse.osgi_3.9.1.v20140110-1610
2 ACTIVE osgi02_1.0.0.qualifier
3 ACTIVE org.apache.felix.gogo.runtime_0.10.0.v201209301036
4 ACTIVE org.eclipse.equinox.console_1.0.100.v20130429-0953
5 ACTIVE org.apache.felix.gogo.shell_0.10.0.v201212101605
6 ACTIVE org.apache.felix.gogo.command_0.10.0.v201209301215
四.简单的控制台操作
1.ss:查看当前运行中的bundles包,该功能包含查看bundle序号,状态,名字
2.stop x:停止当前运行中的序号为X的bundle包
3.start x:启动ss所查看的序号为x的bundle包。
五.注意事项
在使用控制台停止某个bundle的时候,一定需要看清楚,是不是系统的bundle,
如果不想系统关闭,下面这些bundle不能随意停止,否则就会停止服务:
org.eclipse.equinox.console
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
0 0
- 搭建简单的OSGI的hello world
- 简单的hello world
- 简单的‘Hello World!’
- Spring-boot搭建一个简单的Hello World工程
- OSGi环境下建立Web工程的Hello World
- 一个简单的"Hello World"
- 简单的hello world驱动
- hello world 简单的驱动
- hello world 的简单输入输出
- OSGI之Hello World
- wxWindows 最简单的Hello World程序
- 理解简单的Windows Hello World程序
- Ubuntu 下 简单的hello world 驱动
- 一个简单的汇编程序(hello world )
- 玩python-1.简单的hello world
- 一个最简单的hello world操作系统
- 简单的“hello world” windows程序
- 简单的ICE通信应用-Hello World
- 在需求分析中就可以避免的那些错误10
- 编译opencv程序错误调试集合
- 测试驱动开发实践 - Test-Driven Development(转)
- Android中创建Message两种方法比较,new Message和obtainMessage
- EasyUI 结合spring MVC上传图片以及验证图片是否符合规范
- 搭建简单的OSGI的hello world
- 设置虚拟linux系统的桥接网络
- eclipse插件卸载
- Point Cloud Library 1.7.2编译及使用详细教程
- 第1章 android发展史
- iOS截屏
- Android 自定义控件 轻松实现360软件详情页
- js实现获取当前时间的前几天日期
- sublimetext激活