![](/images/new-backgrounds/1314580/31458045x1.webp)
2.3The Full Development Cycle
The second development cycle is slightly more complicated:
Edit source code → Package → Install → Run
1.Edit source code. This is the same as in the simple cycle.
2.Package. In this step, the J2ME Wireless Toolkit compiles and preverifies the source files (essentially the same as the Build step from before). Then it bundles the Java class files and resource files into a MIDlet suite JAR file and a MIDlet suite descriptor.
3.Install. MIDlet suites need to be installed before they can be run. You can install the MIDlet suite into the J2ME Wireless Toolkit emulator or a real device.
4.Run. As in the simple development cycle, run your application and test for bugs.
In the full development cycle, the first step is identical to the simple development cycle. Editing source code is the same as always. The Build step is now incorporated in packaging.
The full development cycle includes two new steps, packaging and installing. Finally, running an installed application is different in important ways from running an application in the simple development cycle.
2.3.1Package
The J2ME Wireless Toolkit automates the task of packaging a MIDlet suite. The end result of packaging is two files, a MIDlet descriptor and a MIDlet suite JAR. The descriptor is a small text file that contains information about the MIDlet suite. The JAR contains the class files and resources that make up the MIDlet suite. Devices can use the descriptor to learn about the application before downloading the entire JAR, an important consideration in a
To ask the toolkit to package your MIDlet suite, choose Project > Package > Create Package from the KToolbar menu. The MIDlet suite descriptor and JAR are generated and placed in the bin directory of your project.
Packaging might involve additional steps. You can use a code obfuscator to shrink the size of the MIDlet suite JAR, a technique that is described later in this chapter. In addition, the J2ME Wireless Toolkit provides tools to allow you to cryptographically sign MIDlet suites. See Chapter 6, “Security and MIDlet Signing,” for more information.
Chapter 2 Developing MIDlet Suites 11