基于Equinox构建OSGi项目
几种OSGi框架
- Equinox is the most widely deployed OSGi framework today owing to its use in the core runtime of Eclipse. It can also be found in many in-house custom applications as well as packaged products such as Lotus Notes and IBM WebSphere Application Server. Equinox implements Release 4.1 of the OSGi specifications and is licensed under the Eclipse Public License (EPL).
- Knopflerfish is a popular and mature implementation of both OSGi Release 3 and Release 4.1 specifications. It is developed and maintained by Makewave AB, a company based in Sweden, and is licensed under a BSD-style license. Makewave also offers Knopflerfish Pro, a commercially supported version of Knopflerfish.
- Felix is a community implementation of the OSGi Release 4.x under the Apache Group umbrella. It is designed particularly for compactness and ease of embedding, and is the smallest (in terms of minimal JAR size) of the Release 4 implementations. It is licensed under the Apache License Version 2.0.
- Concierge is a very compact and highly optimized implementation of OSGi Release 3. This makes it particularly suited to resource-constrained plat-forms such as mobile phones. Concierge is licensed under a BSD-style license.
下载Equinox框架
设置Eclipse
运行Equinox
Run Configuration
- The first argument -console indicates that Equinox should create an interactive console for us to work with – if we forget this argument then it will start up and then immediately exit!
- The second argument (consisting of two words, -configuration runtime) asks Equinox to create its “configuration area” in a local directory named runtime. The configuration area is where Equinox stores its temporary state information.
Run
Framework is launched .
id State Bundle
ACTIVE org . eclipse . osgi_3 .
.
. v20090311 −
“System Bundle”, and it always has the bundle ID of zero.
Run from command line
/ plugins
/ org.eclipse.osgi_∗.jar −console −configuration runtime
Install bundle
import org.osgi.framework.BundleActivator ;
import org.osgi.framework.BundleContext ;
public
class HelloWorldActivator
implements BundleActivator {
public
void start ( BundleContext context )
throws Exception {
System.out.println (
" Hello , World !" ) ;
}
public
void stop ( BundleContext context )
throws Exception {
System.out.println (
" Goodbye , World !" ) ;
}
}
: helloworld . jar
id State Bundle
ACTIVE org . eclipse . osgi_3 .
.
. v20090311 −
INSTALLED helloworld_0 .
.
Start bundle
> start
Hello , World
!
ACTIVE helloworld_0 .
.
Stop bundle
> stop
Goodbye , World
!
RESOLVED helloworld_0 .
.
基于Equinox构建OSGi项目的更多相关文章
- Jenkins:基于linux构建ivy项目
Jenkins:基于linux构建ivy项目 (二) 基于以上<Jenkins:VMware虚拟机Linux系统的详细安装和使用教程(一)>的配置再进行对ivy项目构建: 启动tomcat ...
- 基于已构建S2SH项目配置全注解方式简化配置文件
如果还不熟悉s2sh项目搭建的朋友可以先阅读 eclipse环境下基于tomcat-7.0.82构建struts2项目 eclipse环境下基于已构建struts2项目整合spring+hiberna ...
- 基于 Equinox 的 OSGi Console 的研究和探索
自定制 OSGi Console 进行组建和服务生命周期管理模块化编程的好处已经很好地被理解了约 40 年,但在 OSGi 之前,开发人员不得不自己发明模块化设计和系统.随着软件应用体系结构的不断发展 ...
- eclipse环境下基于已构建struts2项目整合spring+hibernate
本文是基于已构建的struts2项目基础上整合 spring+hibernate,若读者还不熟悉struts2项目,请先阅读 eclipse环境下基于tomcat-7.0.82构建struts2项目 ...
- 基于dubbo构建分布式项目与服务模块
关于分布式服务架构的背景和需求可查阅http://dubbo.io/.不同于传统的单工程项目,本文主要学习如何通过maven和dubbo将构建分布项目以及服务模块,下面直接开始. 创建项目以及模块 ...
- 基于Maven构建Web项目
1.下载Maven,并配置好环境变量 2.打开命令行窗口,输入以下命令构建Maven Web项目 mvn archetype:generate -DgroupId=com.hello -Dartifa ...
- 【转载】基于webpack构建react项目
第一部分链接:下载所需内容并构建基础的页面 第二部分链接:添加webpack中的一些常用babel和loader 第三部分链接:开发环境与生产环境的配置
- 基于maven构建javaweb项目思路梳理及改进
需要准备的东西: Jdk. myeclipse. maven包 预装jdk环境 1.maven安装及配置: a) 详见url https://www.cnblogs.com/eagle668 ...
- 基于Maven构建的Spring+Mybatis项目
项目的目录结构: 1.基于Maven构建Web项目 参考:基于Maven构建Web项目 2.导入项目依赖 Spring 核心容器(Beans.Core.Context.Context support. ...
随机推荐
- Linux read/write fread/fwrite两者区别
Linux read/write fread/fwrite两者区别 1,fread是带缓冲的,read不带缓冲. 2,fopen是标准c里定义的,open是POSIX中定义的. 3,fread可以读一 ...
- Linux开发工具之Makefile(上)
二.makefile(上) 01.make工具 利用make工具可以自动完成编译工作.这些工作包括:如果修改了某几 个源文件,则只重装新编译这几个源文件:如果某个头文件被修改了,则 重新编译所有包 ...
- 传感器 Sensor 加速度【示例】
简介 坐标系 x轴:从左到右 y轴:从下到上 z轴:从内到外 这个坐标系与Android 2D API中的不同,传感器中的返回值都以此坐标系为准. SENSOR_TYPE_ACCELEROMETER ...
- Codeforces-Div312
题意:给你n个数,进行*2,/2操作,求解最小操作次数能使所有数相同. 思路:因为数值在100000以内,直接枚举过去,对读入的每一个数,模拟操作,用数组s来存放累计操作步数,数组flag用来标记确 ...
- 2015 Multi-University Training Contest 2
附上第二场比赛的链接 从5300-5309 我是链接 顺便贴出官方题解:
- 无法在web服务器上启动调试。调试失败,因为没有启用集成windows身份验证
----注意:以管理员身份运行VS C#中ASP.NET Web应用程序编译时的错误:无法在web服务器上启动调试.调试失败,因为没有启用集成windows身份验证. 解决:打开IIS,在IIS里查看 ...
- C++ 数组作为函数参数时,传递数组大小的方法
废话不多说,先上错误示范: void fun(int arr[arr_num]) { // ... } int main() { // ... int *arr = new int[10]; fun( ...
- jquery之bind(),live(),delegate()
大纲: 1.bind(),live(),delegate()的含义 2.三者基于相同的原理即js的事件冒泡 3.三者相互之间的异同. bind()+live() V.S. delegate():bin ...
- Linux下修改键盘默认布局
有时候在安装Linux选择键盘到布局到时候,会选择错误,这个时候可以选择终端命令来进行重新选择 sudo dpkg-reconfigure keyboard-configuration 之后键盘文我选 ...
- tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable
linux 下 启动tomcat 报: Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least o ...