Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
anw1652
Posts: 86
Registered: ‎03-06-2010
My Device: 9000/9700
Accepted Solution

How to specify JRE (Component Pack)

When I created my project, it asked me what JRE to use, and I told it 4.6.  Now, I'd like to change it to 4.5 (and change it back again upon my whim, and so on).  When I go to "Windows->Preferences->Java->Installed JREs", I can see all the components, as I should, and I can select whichever I want, which only makes it the default for newly created projects.  When I right-click on my project and go to "Properties->Blackberry Project->View/Edit Application Descriptor", there are all my JREs (and therefore I assume these are the component packs) under the heading "Preprocessor Directives", which doesn't seem to have anything to do with JREs or component packs.  Furthermore, they are all greyed out and I can't select a different one than the one labeled "BlackBerrySDK4.6.0", even though I can see all the others greyed out.

 

Am I in the right place to change the JRE/Component Pack I want to build for and, if so, how do I get the selections un-grey?

 

Or, alternatively, is there a file I can edit somewhere that tells Eclipse/Blackberry which JRE to use?

 

Thanks,

Allen

 

TIA,
Allen
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: How to specify JRE (Component Pack)

[ Edited ]

You should see JRE System Library within your project in your Package Explorer.

 

Right-click this and click properties to change your target OS.

 

The preprocessor directives change whenever you change the JRE so you can use preprocessor to strip out code that is not compatible with a certain OS.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Regular Contributor
anw1652
Posts: 86
Registered: ‎03-06-2010
My Device: 9000/9700

Re: How to specify JRE (Component Pack)

That did it!  Thanks.

TIA,
Allen
Developer
tylerjames
Posts: 42
Registered: ‎10-06-2008
My Device: Not Specified

Re: How to specify JRE (Component Pack)

Do you have to do this for every Project in the workspace? I have about 10 projects so this would become quite tedious if I want to maintain different build versions.