Problems with OSGi and automatic native loading with JARs
1 post
I have an OSGi application that uses JOGL. Previously, I used RC3 and extracted jogl.all.jar and gluegen-rt.jar into a bundle, then added all the native libraries for each platform to that bundle. This allowed me to have a single JAR / OSGi bundle that worked with all platforms.
As of RC4 (I believe), the natives are automatically loaded from the native JARs. I am unsure how I can package an OSGi bundle that handles this mechanism, and would appreciate any tips.
Expanding a bit on what Julien said, my OSGi projects currently have a main JOGL bundle (containing the code JARs), plus one fragment per platform containing the dll/so/jnilib files. I assume (I haven't tried yet) that with the new "all platforms" natives JAR, we should be able to just put that with the code JARs and eliminate the fragments entirely. If you're using the per-platform natives JARs, you'd have to keep the per-platform fragments, they'd just have natives JARs in them instead of dll/so/jnilib files.