Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 324
Kay Avatar asked Mar 20 '23 21:03

Kay


1 Answers

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.

like image 51
mferlan Avatar answered Apr 06 '23 11:04

mferlan