You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Kevin Carr <ks...@gmail.com> on 2015/07/17 17:52:03 UTC

Osgi Commands with Karaf 4

In 3.x, I was able to use the following:

Dictionary<String, Object> cmdProps = new Hashtable();
        cmdProps.put("osgi.command.scope", "monitor");
        cmdProps.put("osgi.command.function", new String[]{"list"});

        bc.registerService(MonitorProc.class, this, cmdProps);

This would create a command in Karaf.  It wouldn't have help etc, but it
would at least provide the command in a very easy manner.

In 4.x, this no longer seems to work.  Is there a bundle I need to install
or activate?  Or is this feature no longer supported?

Thanks

Scott Carr