Kay
Kay

Reputation: 71

Run OSGi Console of RCP Application (NOT the Host OSGi console)

I need to check whether certain bundles loaded at startup inside my RCP Application. I know there is a "Host OSGi Console" that shows the states of all Plug-Ins within the Eclipse IDE, but I am not interested in those.

I performed the following steps to get the OSGi Console of my application itself:

  1. Added the Plug-In "org.eclipse.equinox.console"

  2. Created a OSGi Framework Configuration: Run Configuration -> OSGi Framework -> MyNewConfiguration

  3. Run the configuration

When I validate the Plug-Ins, it says "Missing constraint: import package org.eclipse.felix.service.command". Where can I find this bundle?

Is this the correct way to open the OSGi Console of my custom RCP application? I'm not able to export the application as a product, so I can't run it outside of the Eclpse IDE.

Upvotes: 4

Views: 3251

Answers (3)

Bob Flannigon
Bob Flannigon

Reputation: 1294

For anyone coming late to the party... In addition to org.eclipse.equinox.console you also need the org.eclipse.pde.ui plugin to be selected in your launch configuration. Use the 'Validate plugins' button as this generates some additional dependencies of its own (in Eclipse 2021-06) this list is:

  • org.eclipse.pde.launching
  • org.eclipse.jdt.core.manipulation
  • org.eclipse.jdt.debug.ui
  • org.eclipse.jdt.junit
  • org.eclipse.jdt.junit.core
  • org.eclipse.jdt.junit.runtime
  • org.eclipse.jdt.ui
  • org.eclipse.ant.launching
  • org.eclipse.ant.ui
  • org.eclipse.ui.trace
  • org.junit
  • org.hamcrest.core

You don't need to specify -console in the program arguments.

Upvotes: 0

mferlan
mferlan

Reputation: 131

Include bundles

  1. org.eclipse.eqinox.console,
  2. org.apache.felix.gogo.runtime,
  3. org.apache.felix.gogo.shell

in your run configuration. Also add option -console to your program arguments. When developing it is sometimes useful to use option -debug and -consoleLog also.

Upvotes: 6

Robin
Robin

Reputation: 24282

Add the option -console to your program arguments.

Upvotes: 2

Related Questions