Question

In my BlackBerry eclipse project I use resource bundles. So I have a pair of files...

Application.rrc
Application.rrh

These files are compiled by a builder called BlackBerry Resources Builder in eclipse.

This is done as a pre-compile step as it creates a new folder called

.locale_interfaces

which contains the following path to a generated java class....

\.locale_interfaces\<package>\ApplicationResource.java

which I reference in my code to access resources.

My question is how do I generate this file from ant?

I am using the bb-ant-tools package but when I call rapc to compile my code I get errors complaining about the missing ApplicationResource.java file.

Apparently there is a step I am missing as the .locale_interfaces folder and the ApplicationResource.java class within are not being generated. I am feeding the Application.rrc file to rapc along with the other sources but that seems to make no difference.

Does anyone have any success building such resource bundles from ant?

Any help would be appreciated.

Thanks!

Was it helpful?

Solution

You shouldn't need to do anything special to have them compile properly from the ant task. As long as both the .rrc and .rrh files are in the <src> tag in the rapc task, it should compile it properly. This is what we do in our ant build.xml file and it works fine.

OTHER TIPS

Ant doesn't create the .locale_interfaces folder. It should compile those things automatically. One work around is to create an interface titled "ApplicationResource.java". Make it reflect the .rrh file in terms of what integer refers to what string. For Example:

MENU_TEXT#0=0;

would translate to

int MENU_TEXT = 0;

in your interface. This will allow things to compile. When you run your program, things should just work. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top