Tuesday, August 16, 2011

Adding Custom Commands to the Equinox OSGi Console

Equinox is a very popular, widely used implementation of the OSGi framework. The command line console of Equinox can be accessed by running with the "-console" option.
You can run the equinox jar file with the console enabled as follows.

java -jar org.eclipse.osgi_3.6.2.R36x_v20110210.jar -console

Or you can also access the OSGi console of your Eclipse installation. Go to the folder where Eclipse is installed and run the following command.

./eclipse -console

if you type "help" command in the prompt you get, you will see a list of available commands and what they do. I am going to show you how to add your own command  to the console.