![](/images/new-backgrounds/1314580/314580233x1.webp)
As a result of this command, preverified class files are placed in the classes directory. If your application uses WMA, MMAPI, or other versions of CLDC or MIDP, be sure to include the relevant .jar files in the classpath.
B.2.2 Package
To package a MIDlet suite, you must create a manifest file, an application JAR, and finally, a MIDlet suite descriptor.
Create a manifest file containing the appropriate attributes as specified in the MIDP specification. You can use any text editor to create the manifest file. A manifest might have the following contents, for example:
Create a JAR file containing the manifest as well as the suite’s class and resource files. To create the JAR file, use the jar tool that comes with the J2SE SDK. The syntax is as follows:
jar cfm <file> <manifest>
The arguments are as follows:
<file>: The JAR file to create.
<manifest>: The manifest file for the MIDlets.
<class_directory>: The directory containing the application’s classes.
<resource_directory>: The directory containing the application’s resources.
For example, to create a JAR file named MyApp.jar whose classes are in the classes directory and resources are in the res directory, use the following command:
jar cfm MyApp.jar MANIFEST.MF -C classes . -C res .
Create a JAD file containing the appropriate attributes as specified in the MIDP specification. You can use any text editor to create the JAD file. This file must have the extension .jad.
Note – You need to set the
Appendix B Command Line Reference 105