I want to programmatically retrieve all the bundles that are loaded. In an older version we were using it in this fashion:
Field osgiField = EclipseStarter.class.getDeclaredField("osgi");
osgiField.setAccessible(true);
final org.eclipse.osgi.framework.internal.core.OSGi osgi =
(org.eclipse.osgi.framework.internal.core.OSGi) osgiField.get(null);
osgi.getBundleContext().getBundles();
How to retrieve all the loaded bundles in the latest osgi?