code: public static boolean isManagedServiceAvailable() {
  		try {
  			return (org.osgi.service.cm.ManagedService.class != null);
  		} catch (NoClassDefFoundError ignore) {
  			return false;
  		}
  	}
docs: Check if {@link org.osgi.service.cm.ManagedService}s could be used
  
  @return <code>true</code> when ManagedService class could be loaded
  <code>false</code> otherwhise