Hi Simon,

Features or no bundles. they are no part of the OSGi specification and only related to Eclipse. Features can be seen as an meta-aggregation of bundle into a functionality description. It is more to ease the humans mind, when handling with large numbers of bundles and get them "categorized".

The OSGi there are subsystems, that are doing similar thing and even more, like isolation of visibility.

With features you can use the root files stuff [1] to copy files nearly wherever you like. Take notice that the stuff is bundled for deployment time. P2 uses the instructions to copy files.

But from my point of view, you should include your files into a bundle or a bundle-fragment. Especially during runtime it is the recommended way, because bundles are resolved by any OSGi resolver. Eclipse Features are not resolved during runtime from equinox. You have to use P2 for that, but even then, features are no real part of your runtime.

I hope it helps.



[1] https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Freference%2Fpde_feature_generating_build.htm

Am 20.04.2018 um 11:43 schrieb Simon Scholz:
Hi guys,

is there a way to access files from features?

With bundles it works pretty straight forward:

Bundle bundle = Platform.getBundle("myBundlesSymbolicName");


Bundle bundle = FrameworkUtil.getBundle(getClass());

and then using the FileLocator to get resources inside the bundle.

Unfortunately there is nothing like:

Feature feature = Platform.getFeature("myFeatureId"); + a way to get
files from this feature JAR.

Can someone tell me how to do that in the right way?

Thanks in Advance,

Simon Scholz

equinox-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit

Reply via email to