Stefano Lenzi <[EMAIL PROTECTED]> wrote on 10/09/2007 03:30:56 PM: > Also I would like to ask to the Eclipse expert how does Eclipse > implements Execution Environment, because in the properties of a Java > Project it's possible to define the Execution Environment both for > execution and compilation.
Not sure if I am "the Eclipse Expert" to which you refer but I'll take a stab. Basically you define the BREE for your bundle and Eclipse tries to match that with the set of JREs available. We analyze the JREs when they are configured into the IDE to see what EE they represent. It is also possible to define and install "ee files" which describe JREs, the execution environemnt they provide and how to run them. So for example, I have Foundation 1.0 and 1.1, J2SE 1.3, 1.4 and 1.5 JREs available. The net effect is that the IDE compiles my projects against the actual JRE that was declared in the manifest. The story is basically the same with PDE Build. In some cases, for example if there isn't a JRE that exactly matches the BREE then we use the information Eclipse-provided "JRE profile" definitions and setup access rules on the compiler so you get errors if you reference packages you should not. This does not catch references to extra methods or classes though. The PDE Incubator API tools effort will be producing both shell JARs for various modules (eg JREs) as well as being able to post process modules to validate that they are adhering to their API dependency claims. As for using Java 5, in general I would caution against assuming that tools are tools and only used at development time. Especially things like BND which might plausibly used as part of some application that dyanmically creates/installs bundles from JARs etc (e.g., something that takes WARs and converts them to bundles at install time). Retro-weaving is certainly an option. For us we always ask if there is a pressing need for 1.5 function or real value in the language features to counter-act the retroweaving hassle and the API management issues associated with Java 5. Very much a personal/community choice thing. Does BND have alot of API or code that would benefit from this change? HTH Jeff
