---
title: "OSGI之Service注册与使用"
author: "salever"
date: "2012-07-04T13:56:00Z"
tags: ["OSGI"]
categories: ["编程语言"]
slug: "osgi-service"
draft: false
lastmod: "2012-07-04T14:00:41Z"
id: 1576427
url: "https://salever.iteye.com/blog/1576427"
---

OSGI的Service，就不介绍了。它主要是为了解除bundle之类的“死”依赖，将具体的实现与API接口分离。下面看看如何在OSGI应用中使用Service。

测试环境：eclipse 3.6， Equinox

首先是测试的plugin project——org.equinoxogsi.toast.dev.gps

详细见：[http://www.xeclipse.com/?](http://www.xeclipse.com/?p=1195)[p=1220](http://www.xeclipse.com/?p=1220)