OSGi---2Example学习

首先,这是一篇体验OSGi的文章,并没有涉及高级应用。

Example的介绍来自:http://www.ibm.com/developerworks/cn/opensource/os-ecl-osgibdev/index.html#download

另外可以详细读读:http://www.ibm.com/developerworks/cn/opensource/os-ecl-osgiconsole/index.html

主要是在Console的一些命令进行记录:

 

---Eclipse Runtime commands---

diag - Displays unsatisfied constraints for the specified bundle(s).

enableBundle - enable the specified bundle(s)

disableBundle - disable the specified bundle(s)

disabledBundles - list disabled bundles in the system

---Controlling the OSGi framework---

launch - start the OSGi Framework

shutdown - shutdown the OSGi Framework

close - shutdown and exit

exit - exit immediately (System.exit)

init - uninstall all bundles

setprop <key>=<value> - set the OSGi property

---Controlling Bundles---

install - install and optionally start bundle from the given URL

uninstall - uninstall the specified bundle(s)

start - start the specified bundle(s)

stop - stop the specified bundle(s)

refresh - refresh the packages of the specified bundles

update - update the specified bundle(s)

---Displaying Status---

status [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display installed bundles and registered 

 

services

ss [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display installed bundles (short status)

services [filter] - display registered service details

packages [<pkgname>|<id>|<location>] - display imported/exported package details

bundles [-s [<comma separated list of bundle states>]  [<segment of bsn>]] - display details for all installed bundles

bundle (<id>|<location>) - display details for the specified bundle(s)

headers (<id>|<location>) - print bundle headers

log (<id>|<location>) - display log entries

---Extras---

exec <command> - execute a command in a separate process and wait

fork <command> - execute a command in a separate process

gc - perform a garbage collection

getprop  [ name ] - displays the system properties with the given name, or all of them.

---Controlling Start Level---

sl [<id>|<location>] - display the start level for the specified bundle, or for the framework if no bundle specified

setfwsl <start level> - set the framework start level

setbsl <start level> (<id>|<location>) - set the start level for the bundle(s)

setibsl <start level> - set the initial bundle start level

---Controlling the Profiling---

profilelog - Display & flush the profile log messages

---Controlling the Console---

more - More prompt for console output

 

 

----------------------------------------------------------------------------

问题是,在这里,最基本的命令是Install 了,关于这个Url,很多朋友知道Url怎么装,但是,如果这个地址是本地的怎么办呢?

在Google上找了半天也没有,最后,尝试了一下,经验呀!

本地目录配置如下:

假如要安装一个OSGi Plug-in workplace的工作目录是:C:/watson/

                                          而Project的代码目录是:C:/watson/example/exampleClientSource

                         那么Install 命令就是: install file:../watson/example/exampleClientSource

                           ------------------------------------------------------

Hai Liang Wang 深度学习 算法 自然语言处理
Chatopera 联合创始人 & CEO,运营聊天机器人平台 https://bot.chatopera.com,让聊天机器人上线!2012年开始从事业务流程云,业务流程引擎开发,2015年开始探索聊天机器人的商业应用,实现基于自然语言交互的流程引擎、语音识别、自然语言理解,2018年出版《智能问答与深度学习》一书。
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值