在osgi中install bundle很简单。指令如下:

file:+jar包路径:

osgi> install file:./hello-activator-1.0.0.jar

Bundle id is 3

 

osgi> ss

 

Framework is launched.

 

id      State       Bundle

0       ACTIVE      org.eclipse.osgi_3.7.2.v20120110-1415

3       INSTALLED   com.pragprog.HelloWorld_1.0.0

 

osgi> start 3

Hello World!