karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: List User installed bundles in Karaf from Java
Date Wed, 06 Aug 2014 09:39:59 GMT
Hi Sapna,

it's because the osgi:list by default display only the bundle with a 
level greater than the system one (so the user bundles).
If you do osgi:list -t 0 (or la which is an alias to osgi:list -t 0), 
you will have the list of all bundles (both system and user).

If you want to do it programmatically, you have to check the bundle 
level and only display bundles with level greater than 50.

Regards
JB

On 08/06/2014 11:29 AM, SapnaB wrote:
> Hi,
>
> When I execute the osgi:list command on Karaf 2.3.2, it lists down the
> bundles which I (user) have installed.
> I want a similar result through java code.
>
> But when I do context.getBundles() and filter ACTIVE bundles, I get the
> complete list installed in Karaf.
> Is there a way to get only user installed bundles through Java?
>
> Thanks,
> Sapna
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/List-User-installed-bundles-in-Karaf-from-Java-tp4034602.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message