There is no "true" mechanism, it just depends on the example.

In this case, the example paint program is simplistic, but you are correct it is not necessarily a good idea to hardcode in values like this.

The example could have used another approach, such as using configuration properties, like Felix' launcher, or it could have used a directory where it just loads all the bundles in it. The example was intended to be simple and short, the current approach was taken to achieve that effect.

In reality, the code you are referring to below is in the static main() method, which is really just a launcher that in most cases would be in a separate class. However, in this case we were just demonstrating that a JAR file can be both a bundle and an application.

-> richard

Juan Lucas Dominguez Rubio wrote:
Hi list. Forgive my ignorance, but there is something I don't understand in the 
code of the main bundle in one of the examples. The code says:
...
configMap.put(AutoActivator.AUTO_START_PROP + ".1",
             "file:../extenderbased.circle/target/extenderbased.circle-1.0.0.jar 
" +
             "file:../extenderbased.square/target/extenderbased.square-1.0.0.jar 
" +
             
"file:../extenderbased.triangle/target/extenderbased.triangle-1.0.0.jar");
...
but the host application (or the main bundle) is not supposed to know at compiling time which bundles (plugins) are available. So why those JAR files are listed there? Which is the true mechanism to find out which bundlers are available? Regards,
Lucas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to