Method method = runtimeClass.getMethod("getInstance");
instance = (OSGiRuntime) method.invoke(null);
return instance;
} catch (Exception e) {
throw new BundleException("Could not start OSGi runtime " + runtimeClassName, e);
}
}
try {
instance = EquinoxRuntime.getInstance();
return instance;
} catch (ClassNotFoundException e) {
// Ignore
} catch (Throwable e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
try {
instance = FelixRuntime.getInstance();
return instance;
} catch (ClassNotFoundException e) {
// Ignore
} catch (Throwable e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
try {
instance = KnopflerfishRuntime.getInstance();
return instance;
} catch (ClassNotFoundException e) {
// Ignore
} catch (Throwable e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
throw new BundleException("Could not start OSGi runtime from the classpath");
}