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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified
Accepted Solution

use different JADs to deploy one COD with different properties

I never got different JADs to work for website deployment.


Here is the problem, I use MIDLET getAppProperty to get a property.

I build a myMidlet.COD file with myMidlet.jad which has a HOST property.


I have on a website ten different JADs with different HOST property for

the one myMidlet.COD to be deployed. The midelt deploys nicely to the Blackberry

but the HOST is the same one used to build the COD. I was given an excerpt of code and

added some debug statements to see what this Module thing is 


public class mybbProperty {
    CodeModuleGroup[] allGroups;
    CodeModuleGroup myGroup = null;
    String moduleName;
    boolean flag=true;

    public void mybbProperty(){

    public void init(){
        versForm.debugtext+="\n init";

        CodeModuleGroup[] allGroups = CodeModuleGroupManager.loadAll();
        moduleName = ApplicationDescriptor.currentApplicationDescriptor().getModuleName();
        versForm.debugtext+="\n mode "+moduleName;   //note modulename is correct and is "myMidlet"


        for (int i = 0; i < allGroups.length; i++) {
//      versForm.debugtext+="\n"+allGroups[i].getFriendlyName();

            if (allGroups[i].getFriendlyName().equals("myMidlet")) {
                versForm.debugtext+="\n **found";
                for (Enumeration e = allGroups[i].getModules();
                    e.hasMoreElements() Smiley Wink {
                    versForm.debugtext+="\n **"+e.nextElement();
                myGroup = allGroups[i];
//            for (Enumeration e = allGroups[i].getModules();
//                e.hasMoreElements() Smiley Wink {
//                versForm.debugtext+="\n **"+e.nextElement();
//            }

            if (allGroups[i].containsModule(moduleName)) {
                myGroup = allGroups[i];
        versForm.debugtext+="\n end";


    public String getAppProperty(String name){
        if (flag)
        versForm.debugtext+="\n getAppProp "+name;
        if (myGroup==null)
            return null;
        return myGroup.getProperty(name);


I use the function mybbProperty.getAppProperty("AppMyHost");


I noticed that the getFriendlyName() has the name of my Application so I use it and

print out information. What I get is this


 mybbProperty mybb= new mybbProperty();

 String                s = mybb.getAppProperty("AppMyHOST");








which of course returns NULL. So how do I get properties from another JAD which was used to deploy the

app to the Blackberry. In Nokia its pretty simple use MIDlet getAppProperty() as you need a jad and jar to

deploy it. 


Anyway I have no idea which module to get. The JAD I used to deploy the COD was called green.jad

so I have no idea why myMidlet is of importance. Wouldn't I see green.jad somewhere?


Anyway, would appreciate any code that does this correctly.


BlackBerry Development Advisor
Posts: 15,888
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: use different JADs to deploy one COD with different properties

Please see this thread on this issue.




Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified

Re: use different JADs to deploy one COD with different properties

Okay thanks, Will have to test on OS 4.3.0 it does not work on 4.2.1 though the API is available on that

OS the function is not.


Thank you solved.