title: Declarative OSGi Services
body: <p>I have a question about declarative OSGi Services. I have the following interface : </p>
  
  <pre><code>  public interface PrintService {
      public void print();
    }
  </code></pre>
  
  <p>and its implementation: </p>
  
  <pre><code>    public class PrintServiceImpl implements PrintService {
  
        @Override
        public void print() {
          System.out.println("Hello from PrintServiceImpl!");
        }
      }
  </code></pre>
  
  <p>OSGI-INF/component.xml :</p>
  
  <pre><code>&lt;scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="service"&gt;
     &lt;implementation class="service.PrintServiceImpl"/&gt;
     &lt;service&gt;
        &lt;provide interface="print.PrintService"/&gt;
     &lt;/service&gt;
  &lt;/scr:component&gt;
  </code></pre>
  
  <p>MANIFEST.MF :</p>
  
  <pre><code>Service-Component: OSGI-INF/component.xml
  </code></pre>
  
  <p>After I install the service and start it nothing happend. How can I activate it and print "<em>Hello from PrintServiceImpl!</em>" to console. </p>