How to get Midlet version in lwuit?

java-me, lwuit, midp

Solution

From your MIDlet subclass

String version = getAppProperty("MIDlet-Version");

Extracted from:

http://www.developer.nokia.com/Community/Discussion/showthread.php?153128-MIDlet-Version

Problem

I have the jad file with following description ``` MIDlet-Jar-Size: 404071 MIDlet-Jar-URL: test.jar MIDlet-Name: test MIDlet-Vendor: Vendor MIDlet-Version: 1.0.1 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.0 MicroEdition-test: test ``` How to get `MIDlet-Version` through code? I have tried System.getProperty("MIDlet-Version"), but it returns null.

Original source