OSGi offers the following advantages:
  • You can install, uninstall, start, and stop different modules of your application dynamically without restarting the container.
  • Your application can have more than one version of a particular module running at the same time.
  • OSGi provides very good infrastructure for developing service-oriented applications, as well as embedded, mobile, and rich internet apps.

  1. 下载org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar
  2. 开发module . file->new->project->plugin development->plug-in project
  3. file->export -> plug-in development -> deployable plug-ins and framgments
  4. 启动osgi . java -jar xxx.jar -console
  5. 安装插件 install file:c:\....jar
  6. start bundle
  7. stop bundle