public void setFramework(String framework) throws Exception {
Properties properties = new Properties(new File(System.getProperty("karaf.etc"), "config.properties"));
if (!framework.equals("felix") || !framework.equals("equinox"))
throw new IllegalArgumentException("Framework name is not supported. Only felix or equinox are supported.");
properties.put("karaf.framework", framework);
properties.save();
}
public void setStartLevel(int startLevel) {
Bundle b = getBundleContext().getBundle(0);
FrameworkStartLevel fsl = (FrameworkStartLevel) b.adapt(FrameworkStartLevel.class);