karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dealbitte <anand.boc...@gmail.com>
Subject Re: osgi CommandProvider
Date Mon, 22 Oct 2012 13:32:18 GMT
Hi,

did you try this. 
http://karaf.apache.org/manual/latest-2.3.x/developers-guide/archetypes.html

this worked for me without any problem.

I have a command called 'createmsg' that I can execute from the console. The
following class is an example implementation

*******
@Command(scope = "osgi", name = "createmsg", description = "print a
message")
public class createmsg extends OsgiCommandSupport {

    protected Object doExecute() throws Exception {
         System.out.println("Executing command createmsg");
         return null;
    }

*******
regards





--
View this message in context: http://karaf.922171.n3.nabble.com/osgi-CommandProvider-tp4026523p4026525.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message