Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] Understanding BREE

First, there is a big difference between "a BREE" and "a BREE lib". Everyone should use BREE's in their OSGi bundle manifest files, ... it describes the minimum JRE level that that bundle requires to run. See
Eclipse Help and search for "Execution Environments". See also this wiki page: http://wiki.eclipse.org/Execution_Environments

One point of confusion is often that developers think "our users are all on Java 1.6, so our BREE should be set to 1.6", but that's not typically correct. You want to set your BREE to the minimum of what your code in the specific bundle actually requires. Such as, If you are not using language features of 1.6, then 1.5 is a good choice, even if it is anticipated to always run under Java 1.6. Its partially an architectural purity thing ... but, is part of how to achieve the best componentization of your code. Others, or you yourself, may want to "mix and match bundles in unanticipated ways, so there's no reason to constrain that, based on a BREE that's set too high.

In Tycho, it's easy to tell the compiler to use the appropriate level to compile your code, by specifying <useJDK>BREE</useJDK> in configuring your compiler. Otherwise, I believe the default is it uses the same version for everything which may cause problems or may miss problems. It does require you to create a "toolchain" file to define what and where each BREE you use can find the libraries for that level, but that's pretty easy:
http://wiki.eclipse.org/Tycho/Release_Notes/0.14

It depends a little ... if you are just getting started, have only a few bundles ... especially if they are for a "pure app", and not something like a framework that you are providing, then it is probably not a big deal and something you can worry about later.

But, if you have dozens, or hundreds!, of bundles especially if they are designed to be "mixed and matched", then you'll want to take the time and trouble to understand BREEs.

I'm sure others that can give different opinions and better advice ... but, hope at least a few of these points help you.

Good luck,





From:        Joseph D Carroll Jr <jdsalingerjr@xxxxxxxxx>
To:        cbi-dev@xxxxxxxxxxx,
Date:        05/29/2013 05:54 PM
Subject:        [cbi-dev] Understanding BREE
Sent by:        cbi-dev-bounces@xxxxxxxxxxx




I've been seeing a lot of chatter about using BREE-libs and I really do not have any idea what those are.

Is there some documentation that explains BREE?  

In general, I am trying to determine what (if any) benefits exist by including CBI in our build process.  

Thanks,

JD_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cbi-dev


Back to the top