How do I compile Java source code for a MIDP application?
The usual method is as follows: • Compile using an ordinary Java compiler • Convert the classes to CLDC format • Create a manifest file containing configuration information • Package the classes and manifest into a JAR file, including any other required files such as images and sounds The JAR file can then be deployed to the device, or run on an emulator (see below). When compiling the source code, it is helpful to tell the compiler not to compile against the standard J2SE class library, because most of it doesn’t exist in CLDC. Instead, the compiler should refer only to CLDC and MIDP classes. You should be able to get JAR files of these classes from vendors of mobile devices, or use the archives included with Sun’s Wireless Toolkit.