I created a command component for OSGi and using Apache Felix Shell. One command opens a new Thread which starts a SWT UI.
In the BND Config the SWT Bundle is required for building and to run this component. The Problem now is, that every developer has to change the config and include the SWT Bundle for their OS. Also for every OS a other packed Bundle is needed, where the only difference is a line in the Manifest of the jar, which other Bundles are required to launch.
Is there any trick in BND or OSGi, where i can set a build or run dependency dependent on the current running system?
Something like "org.eclipse.swt.{OS}.{WS}.{ARCH}" instead of "org.eclipse.swt.win32.win32.x86_64"? Or at least can I require a specific OS in the config? So that if a user uses a wrong bundle, it shows a nice error instead of a ClassNotFound Exception?
The solution described in another question (http://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/5784073#5784073) doesn't work for me or better I don't know how this could be done with BND/OSGi.
Any Idea?