title: How to include a dependency to a jar file from an eclipse/osgi application?
body: <p>I created an Eclipse 4 application and I needed a <code>jar</code> offering a functionality as part of my application (this could be anything e.g. <code>log4j</code> to make it trivial).<br>
  I added the <code>jar</code> as part of my project's classpath (<code>Right Click-&gt;Configure Build Path</code>) but on runtime my service failed with a <code>ClassNotFound</code> error (from OSGI I guess?).<br>
  Anyway searching this it turned out, at least as I have understand it, that I should add the jar as part of another <code>Plugin</code> and create a dependency from my application/service to this new plugin.<br>
  I.e. I created a <code>Plugin Project from Existing JAR archives</code>.<br>
  This time the setup worked.<br>
  So if I understand this, when developing for Eclipse/OSGi we should not add <code>jars</code> in the classpaths directly but add them via plugins (why?).<br>
  <strong>Question:</strong> If I am correct so far, what is the standard practice to include <code>jars</code> when developing a project?<br>
  Define/Create one <code>Plugin Project from existing JAR archives</code> and add <strong>all</strong> the required third party libraries needed there, <em>or</em> have a different plugin project per needed <code>jar</code> <em>or</em> something else perhaps???<br>
  Sorry if my terminology is not accurate. I am new in OSGi and Eclipse programming  </p>
  
  <p><strong>Note:</strong> When talking about <code>jars</code> I am not refering to other OSGi services. I am refering to the norm of using ready, reliable third party libraries that would be needed by many parts of an application. E.g. <code>log4j</code> or an xml parsing library or <code>apache commons</code> etc</p>