views:

85

answers:

1

I have a BlackBerry Java project in Eclipse. It has version number written down in four different spots:

  • in the project properties, under "BlackBerry Project Settings/General"

  • in the JAD file, under MIDlet-1 (?)

  • in the JAD file, under MIDlet-Version

  • in the ALX file, under <version> (?)

And they seem uncorrelated. Changing either of these affects none of the rest. The third one is what the users sees during over-the-air setup and under Options/Advanced.

Questions - why do we need all these? Are there contexts where numbers 1, 2, 4 come up? It's my understanding that the ALX is generated during compilation - where does the version # come from? Is there a way to learn at least one of those programmatically (without signing the app)?

EDIT: #1 comes up in the ApplicationDescriptor.currentApplicationDescriptor().getVersion().

+1  A: 

Should all be managed with the Blackberry_app_descriptor file from the new Blackberry plugin. I Just checked it with JRE 4.5 (in the newest plugin setup) and its all there.

(More info in your comments of course)

To get the information programatically, you need to use ApplicationDescriptor.getVersion()

Link for the version you are using.

Noctrine
And the version that comes up is the one from project properties! The one that does not necessarily match the version # in the JAD. Ain't that fun.
Seva Alekseyev
Yeah I have no idea why its not being adjusted when you run. The only thing I could suggest for that is upgrade to the plugin that uses Eclipse 3.5.You may run into some issues with bringing in a Legacy Project and loosing your Run Configuration (or not having a compatible configuration)
Noctrine