MIDlet configuration (Netbeans)
Tutorial, July 3, 2015 - 10:05am, 4297 views
This tutorial describes how you can configure your MIDlet inside Netbeans. MIDlet configuration is needed if you want to enable autostart. Java user guide on this subject says:
every MIDlet that is started automatically needs to be configured via its jad file and the following properties:
- Oracle-MIDlet-Autostart: [0-5], autostart order. 0 means no autostart. For MIDlets with the same level the order is not defined.
- Oracle-MIDlet-Restart: [true|false], if true the MIDlet is automatically restarted if it terminates non gracefully, e.g. by an uncaught exception.
- Oracle-MIDlet-Restart-Count: [number], number of allowed MIDlets restarts before the whole module is rebooted
1. Right click on your project and select properties:
2. Select Application Descriptor, then add attributes which are described above:
For Autostart it's recomended to set the order greater than 1 to make sure that the factory JRC MIDlet will always start first.
3. By default scfg parameter AT^SCFG="Userware/Autostart","1" if it's not 1, set it to 1. You can check your SCFG settings with AT command AT^SCFG?. Then you just install your MIDlet, restart the module and MIDlet should autostart.
More on the subject you can read in Java user guide in chapter: 9.4.1 Switch on Autostart