[kf-users] Include external JARS
kolsen at concentris-systems.com
kolsen at concentris-systems.com
Fri Apr 3 22:04:36 CEST 2009
In my case I have a knopflerfish plugin project named 'rapidlink-ant' whose
structure can be seen in this screenshot.
http://www.concentris-systems.com/images/dev/rapidlink-ant.png
I wanted to add apache ant capabilities via two 'wrapper' classes of my own
- AntProject.class and AntShell.class
In order to compile/run them I have to include ant.jar, crimson.jar and
jaxp.jar
If you look at the screenshot you'll see that my 'lib' folder contains the
ant jars I need, and the 'src' dir contains my classes. Next, checkout the
'Bundle Classpath' in the top-right of the screenshot and you'll see it
includes the jars from the lib dir. And lastly you'll see that I'm only
exporting my own code, and not the apache ant code.
Here is the contents of the bundle.manifest (as shown graphically in the
screenshot):
------------------------------
Manifest-Version: 1.0
Bundle-Vendor: Concentris-Systems LLC.
Bundle-Version: 2.1.1
Bundle-Name: rapidlink-ant
Bundle-ManifestVersion: 2
Bundle-Description: Provides apache ant compatible with java 1.4
Bundle-SymbolicName: rapidlink_ant
Bundle-ClassPath: ., lib/ant.jar, lib/crimson.jar, lib/jaxp.jar
Export-Package: rapidlink.ant
-------------------------------
Here is the MANIFEST.MF (autogenerated from bundle.manifest) that was
actually put into the bundle:
-----------------------------------
Manifest-Version: 1.0
Export-Package: rapidlink.ant
Bundle-Vendor: Concentris-Systems LLC.
Bundle-ClassPath: ., lib/ant.jar, lib/crimson.jar, lib/jaxp.jar
Bundle-Version: 2.1.1
Bundle-Name: rapidlink-ant
Bundle-ManifestVersion: 2
Bundle-Description: Provides apache ant compatible with java 1.4
Bundle-SymbolicName: rapidlink_ant
Build-Date: Thu Apr 02 10:52:55 HST 2009
---------------------------------------
Finally, this screenshot from winzip shows what was actually put in the
bundle:
http://www.concentris-systems.com/images/dev/bundle.png
Hope this helps.....
Kurt
On Fri, 3 Apr 2009 09:30:29 +0100, John Michael <jhnmchl0 at gmail.com> wrote:
> I have this:
>
> Bundle-ClassPath: .,lib/hibernate3.jar
>
> but it still doesn't work :\
>
> What do you have on our Bundle-ClassPath?
>
>
> On Thu, Apr 2, 2009 at 8:00 PM, <kolsen at concentris-systems.com> wrote:
>
>>
>> I just use the knopflerfish plugin for eclipse.
>> Open the bundle.manifest (the kf editor should be invoked) and then in
> the
>> topright corner you'll see 'bundle classpath'.
>> I just add any dependent jars there. They end up in the bundle I do
>> believe....
>> The 'uber jar' comment in the previous post is on the money however.
>> See if you can break out the commonly used stuff into separate bundles
> so
>> that other modules can use the code too.
>> Kurt
>>
>> On Thu, 2 Apr 2009 12:09:55 +0100, John Michael <jhnmchl0 at gmail.com>
>> wrote:
>> > Hi,
>> >
>> >
>> > How do I include external JARs? My service compiles fine, but when I
>> start
>> > it on knoplerfish, it fails because it kind find a class that's on an
>> > external JAR.
>> >
>> >
>> > Thanks
>>
>> _______________________________________________
>> Knopflerfish-users mailing list
>> Knopflerfish-users at knopflerfish.org
>> http://www.knopflerfish.org/mailman/listinfo.cgi/knopflerfish-users
>>
More information about the Knopflerfish-users
mailing list