if (!Felix.NAME.equalsIgnoreCase(framework) && !Equinox.NAME.equalsIgnoreCase(framework)) {
System.err.printf("Unsupported framework: %s%n", framework);
return null;
}
if (Felix.NAME.equalsIgnoreCase(framework))
frwk = new Felix(new File(KARAF_BASE));
else
frwk = new Equinox(new File(KARAF_BASE));
Properties props = new Properties(new File(System.getProperty("karaf.base"), "etc/config.properties"));
props.put("karaf.framework", framework.toLowerCase());
props.save();