09-01-2010 05:59 AM
In my eclipse project I use resource bundles. So I have a pair of files...
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
which contains the following path to a generated java class....
which I reference in my code to access resources. Eclipse generates this before compiling the rest of the sources since those sources reference this generated file.
My question is how do I generate this .locale_interfaces/<package>/ApplicationResource.j
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.
Solved! Go to Solution.
09-01-2010 06:06 AM
i use eclipse without the plugin. in my project there is an ApplicationResource.java interface (with all values as 0).
it is not included in the jde project as the jde creates it on compile time (as you have noticed)
09-01-2010 06:17 AM
I don't understand. If you have a stub file with all values as 0 then how do you find your resources in the built product? I need to build entirely without eclipse, i.e. for automated builds, so I need the real values in that interface. Can you explain a bit more?
09-01-2010 06:43 AM
the (real) interface is created by the compiler, i think.
i use it only as a dummy interface to allow eclipse to handle the resource strings.
the resource file has to be named AppNameResource and must include a long BUNDLE_ID and a String BUNDLE_NAME.
09-01-2010 11:47 AM
My problem was I needed to add both the .rrc and .rrh as extensions to my <src> tag. I had previously only had .rrc added.
<include name="**/*.java" />
<include name="**/*.rrc" />
<include name="**/*.rrh" />
It compiles fine now.