Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As it was written in previous answers you have two options if you want to use additional libraries in your bundles:</p> <ol> <li>embedding library jars in a bundle in which it will be used,</li> <li>creating a valid OSGi bundle from the library.</li> </ol> <p>The <strong>first approach</strong> is simpler because you only need to copy library jars (and all its dependencies) to a bundle (e.g. to a root directory) and then add them to <code>Bundle-Classpath</code> element in <code>MANIFEST.MF</code> (see <a href="https://stackoverflow.com/questions/1340483/osgi-handling-3rd-party-jars-required-by-a-bundle/1340565#1340565">here</a>). However, while doing this you must remember that this added library will be visible only in a bundle in which it is embedded (so library reuse is limited). You could always add packages from this library to <code>Export-package</code> element in <code>MANIFEST.MF</code> to make it visible for other bundles but this is far from elegant solution (however it will work).</p> <p>In order to make it visible to other bundles you should use the <strong>second approach</strong>, i.e. create an OSGi bundle from the library (there are tools which can help you in doing that, also in Eclipse). However, for more complicated libraries this approach may be harder (because of dependencies and specific class loading approach in OSGi).</p> <p>So if you want to use the library only in one bundle I suggest using the first approach (it is easier to implement). If you want to use this library in many bundles in your application you should consider the second approach.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload