Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8984537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:07:50+00:00 2026-06-15T21:07:50+00:00

I created a command component for OSGi and using Apache Felix Shell. One command

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:07:51+00:00Added an answer on June 15, 2026 at 9:07 pm

    bnd can use includes. So create a standard configuration and include this in platform specific bndrun files.

     bnd.bnd:
     # standard set that uses macros for the places where specials need to be insered
     -runbundles: \
            ....
            ${platformdeps}
    
     windows.bndrun:
     -include bnd.bnd
     platformdeps = org.eclipse.swt.win.x86.jar
    

    Anyway, look at bndtools. Neil Bartlett builds bndtools in bndtools without PDE. So he has bndrun files for all platforms.

    There is also an ${if … } macro or a ${replace } macro. If people would still pay for books instead of downloading pirated versions … Until that small problem is solved, look at http://www.aqute.biz/Bnd/Bnd

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one table using the below command: create table Table1( Id int
I've created my custom JSF component according to one of many tutorials (I'm using
I'm new to java and really need some help. I created a command line
I have created a certificate using the following SSL command: makecert -r -pe -n
I've created my own CSR with the following command openssl req -new -newkey rsa:2048
When I create a new Yii application using the yii webapp [my_application] command, it
Set up: New MVC 3 project, using existing database. Created an EF file (edmx),
I have a created a simple applet which sends mail by using smtp.gmail.com on
I created a command line application. Then I realized it would be handy to
I've created an sqlite3 database from the command line and inserted several records. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.