1

I have Eclipse 3.8.1 and I want to see which OSGi bundles are started so I wrote in cmd from eclipse/plugins directory:

java -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console

But nothing happens only empty line

Do I have to install something to see them?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Xelian
  • 16,680
  • 25
  • 99
  • 152
  • See the question which I believe has your answer: http://stackoverflow.com/questions/9905607/equinox-start-error-console-bundle-is-missed/15764754#15764754 – Exploring Apr 02 '13 at 15:15

2 Answers2

3

If you have eclipse already running then you can access the Host OSGI Console from the Console view

Host OSGI Console

UPDATE I think this is what you are looking for

$ java -Dosgi.bundles=org.eclipse.equinox.console_1.0.0.v20120522-1841.jar@start,org.apache.felix.gogo.command_0.8.0.v201108120515.jar@start,org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console
Xelian
  • 16,680
  • 25
  • 99
  • 152
shyam
  • 9,134
  • 4
  • 29
  • 44
  • Thanks,@shyam but when my Eclipse is shut down how can I see OSGi bundles which are still runing? – Xelian Mar 22 '13 at 08:32
  • How would any bundles be running if eclipse itself is not running? The OSGI container should be running before you can load any bundles right? – shyam Mar 22 '13 at 09:12
  • I don't know, I thought that OSGi container can be used without Eclipse installation – Xelian Mar 22 '13 at 09:44
  • 1
    @Xelian Please see the update is that what you are looking for? – shyam Mar 22 '13 at 10:06
  • Yes, if I change the jar version to my it works. Thank you @shyam – Xelian Mar 22 '13 at 10:16
0

There are two options. These are as follows:

  1. Create a configuration folder and put a config.ini file. Set the below content in the config.ini file:

osgi.console.enable.builtin=true

This will start equinox framework with the default console.

  1. Or take the following steps. For details check: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm

Place the necessary bundles in a folder. The bundles are:

org.apache.felix.gogo.command_0.8.0v<version>.jar
org.apache.felix.gogo.runtime_0.8.0v<version>.jar
org.apache.felix.gogo.shell_0.8.0v<version>.jar
org.eclipse.equinox.console_1.0.0v<version>.jar
org.eclipse.osgi.jar

Create a configuration subfolder and a config.ini file in it. Add the following entries in the config.ini file:

osgi.bundles=./org.apache.felix.gogo.runtime_0.8.0v<version>.jar@start,\
./org.apache.felix.gogo.command_0.8.0v<version>.jar@start,\
./org.apache.felix.gogo.shell_0.8.0v<version>.jar@start,\
./org.eclipse.equinox.console.jar@start,\
osgi.console.enable.builtin=false
osgi.console=<port>

Start the Equinox framework with the following command line: java -jar org.eclipse.osgi.jar

Exploring
  • 2,493
  • 11
  • 56
  • 97