title: Knopflerfish, use external library in bundle
body: <p>I know there are two ways of using external libraries in OSGI bundles. As only my package needs the lib (e.g. google-gson) I tried to put it in the <code>Bundle-ClassPath</code> (manifest.mf). But whenever I run the bundle in Knopflerfish I get the <code>Exception in thread "Thread-74" [stderr] java.lang.NoClassDefFoundError: com/google/gson/Gson</code>. </p>
  
  <p>As I am new to OSGI I tried to follow the instructions for creating a bundle from <a href="http://www.knopflerfish.org/releases/current/docs/tutorials/kf_osgi_tutorial/kf_osgi_tutorial.pdf" rel="nofollow">here</a> using a <code>build.xml</code> for compilation where I also included the lib (don't know if this is even correct). So the library appears in three different places, the <em>project classpath</em>, the <em>bundle classpath</em> (manifest.mf) and the <em>build.xml</em>.</p>
  
  <p>I would be glad if someone could give me a hint how to make the library work. Thanks in advance!</p>