I would like to know how to stop a specific bundle in the Apache Felix Web Console running only java code.
For example: I want to be able to retrieve a bundle, let's say by name, and stop it.
From console:
find 'bundle-name'
//display bundles , get the id from here.stop 'id'
From code:
EDIT: To get the PackageAdmin object:
ServiceReference ref = context.getServiceReference(PackageAdmin.class.getName());
PackageAdmin pa = (ref == null) ? null : (PackageAdmin) context.getService(ref);