Add external jar for bundle in KnopFlerFish

852 Views Asked by At

I'm trying build and run a bundle with external jar (tinyos.jar) dependy using knopflerfish.

In the compile time, there aren't problems... but in run time...

org.osgi.framework.BundleException: Unable to resolve bundle: missing package(s) or can not resolve all of the them: net.tinyos.util, net.tinyos.packet, net.tinyos.message

I already put the tinyos.jar in the build path, and already play with the build.xml file a lot... in this moment the build.xml have

  <property name="bmfa.Bundle-Classpath" value=". , ./tinyos.jar"       />
  <property name="bmfa.Import-Package" value=" (others packages),  net.tinyos.message, net.tinyos.packet,  net.tinyos.util "/>
  <property name="bmfa.DynamicImport-Package" value="net.tinyos.message, net.tinyos.packet,  net.tinyos.util "/>

This didn't worked ... So .. what is the propriety that I have to set to the jar be called in run time?

Thanks in advance!

1

There are 1 best solutions below

0
On

Use Bundle-ClassPath: .,tinyos.jar in the manifest of the bundle. The jar should be included in the root of your bundle.