I've been making some progress with this issue. I've got one scenario where the system property is disappearing and the other where it is available to the bundles.
The settings: I have a jar that contains all my jars (including bundles). My loader reads this ueberjar, starts Felix, and initiates the loading of bundles. The difference between the two approaches is in how the InputStream passed to installBundle() is obtained. In the working case, the input stream is obtained from the the ueberjar by doing: this.getClass().getResourceAsStream("/" + jarEntry.getName(). In the second case where the system properties disappear, I read the binaries from the ueberjar, construct a ByteArrayInputStream() and pass it to BundleContext.installBundle(). This is very weird. I can't explain why this should make any difference. I appreciate your input. Max. On Sat, Jul 3, 2010 at 3:38 PM, Angelo van der Sijpt <angelo.vandersi...@luminis.eu> wrote: > Hi Max, > > It depends on what you are trying to accomplish, and what your system looks > like. Using system properties by -D should work fine if you use the default > launcher, but if you have something 'special', this could break down. > > If you need to pass information to you bundles because you want to configure > them for some environment or composition, you could have a look at the > Configuration Admin (part of the compendium spec). > > Do you have a little more information about you situation and goals? > > Angelo > > On Sat, Jul 3, 2010 at 5:51 PM, Max Bridgewater > <max.bridgewa...@gmail.com>wrote: > >> Hi, >> >> I'm desperately trying to pass some information to my bundles. My last >> hope was to use the JVM -D arguments. Unfortunately these are not made >> available to the bundles. I was hoping to find them through >> System.getProperty(). Am I doing something wrong here or this is a >> well know feature? Is there a workaround that would allow me to pass >> information from my custom launcher to my bundles? >> >> Thanks, >> Max. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org >> For additional commands, e-mail: users-h...@felix.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org