---
title: "Eclipse的内核，OSGi的实现：Equinox"
author: "marshal"
date: "2007-11-12T22:54:02Z"
tags: []
slug: "eclipse-osgi-equinox"
draft: false
lastmod: "2007-11-12T22:54:02Z"
id: 140050
url: "https://marshal.iteye.com/blog/140050"
---

## 简介

Equinox是Eclipse的子项目，见：[www.eclipse.org/equinox/](http://www.eclipse.org/equinox/)

Equinox是OSGi R4标准框架规范的实现，该规范见：[osgi.org/osgi\_technology/download\_specs.asp](http://osgi.org/osgi_technology/download_specs.asp?section=2#Release4)

OSGi是面向组件和服务的开发框架标准。

Equinox是Eclipse的基础核心。

Eclipse的各项功能，包括JDT，CDT，PDT等等一切，都是作为插件（组件）绑定在这个OSGi实现Equinox之上。

## 简单使用

Equinox项目可以独立使用，相当于不加载Eclipse上面的各个功能插件。

Equinox可以动态安装，加载，停止和卸载插件。

下载Equinox Framework，见：[download.eclipse.org/eclipse/equinox/drops/R-3.3.1.1-200710231652/index.php](http://download.eclipse.org/eclipse/equinox/drops/R-3.3.1.1-200710231652/index.php)

启动Equinox：

1. java -jar org.eclipse.osgi\_3.3.1.R33x\_v20070828.jar -console

检查当前所有加载的组件命令，ss：

1. osgi&gt; ss
2. Framework is launched.
3. id      State       Bundle
4. 0       ACTIVE      org.eclipse.osgi\_3.3.1.R33x\_v20070828

输入错误的命令，会提示可用的命令

install &lt;bundle url=""&gt;，用于安装组件

start &lt;bundle name="" bundle="" or=""&gt;，用于启动组件

stop &lt;bundle name="" bundle="" or=""&gt;，用于停止组件

diag &lt;bundle name="" bundle="" or=""&gt;，用于报告有关该组件的问题

exit，退出

&lt;/bundle&gt;&lt;/bundle&gt;&lt;/bundle&gt;&lt;/bundle&gt;