天天看點

equinox的osgi指令

控制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

控制bundle的指令:

 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)

顯示bundle狀态的指令:

 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

其它的指令一般不怎麼用到,就不貼出來了.

一般啟動好osgi後,我們會用ss指令來看看目前bundles的啟動狀态

用install指令把開發好的bundle部署到osgi中

用update指令更新已經部署的bundle

用uninstall指令停止一個bundle的服務

轉自:http://www.blogjava.net/jjwwhmm/archive/2008/05/14/200343.html

繼續閱讀