Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Displaying the correct MIDlet version in an About dialog

From Wiki
Jump to: navigation, search
Article Metadata
Created: valery_bogdanov (24 May 2007)
Last edited: hamishwillee (16 Aug 2013)

This code snippet shows how to get the current version of the MIDlet for use in the app "About" dialog.

Novice Java ME developers often hard code the application version in the app About dialog. This is a mistake because it is easy for this value to get out of sync with the version in the JAD file (and thereby confuse end-users). To prevent such errors it is good practice to use the actual application version, taken from JAD file (or JAR file, if the JAD is absent).

Just use following code:

import javax.microedition.midlet.MIDlet;
public class MyMIDlet extends MIDlet {
public String getAppVersion() {
return this.getAppProperty("MIDlet-Version");
This page was last modified on 16 August 2013, at 01:13.
35 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.