February 2, 2011

Equinox tips and tricks

How to start Equinox from command line.

Equinox framework can be started from Windows command line by following command:

java -jar org.eclipse.osgi_3.5.2xxx.jar -console -clean

The framework file can be found in eclipse/plugins directory. A specific version will be placed instead "xxx" characters.

How to clean Equinox cache.

The Equinox framework keeps first started bundles in its cache. That is why your updates are not applied. To clean the cache you need to use a "-clean" parameter. For Windows command line please see the example in a previous clause. In a picture below you can see how to use this parameter inside Eclipse IDE. After this action you need to restart the Equinox framework.




How to get complete set of tools for plugin development

Plugin development is integrated into Eclipse JEE IDE. Don't try to use Eclipse SE.

Newest version of Eclipse


It is highly recommended to use latest version of Eclipse Helios due to enormous number of issues with OSGi.

What is a bundle URL?

The bundle URL is a path which identifies the bundle. It can look like

file:\Full_Path_To_The_Bundle

For example:

file:\C:\Java\bundle_1.0.0.jar

How to resolve a native library call in bundles?

All used native libraries should be listed in a manifest file. See the example below.

Bundle-NativeCode: lib/jnetpcap.dll;
osname = WindowsXP;
osversion = 5.1;
processor = x86

Please read the OSGi core specification (chapter 3.9) for more information.

No comments:

Post a Comment