Antenna provides a set of Ant tasks suitable for developing wireless Java applications targeted at the Mobile Information Device Profile (MIDP). With Antenna, you can compile, preverify, package, obfuscate, and run your MIDP applications (aka MIDlets), manipulate Java Application Descriptor (JAD) files, as well as convert JAR files to PRC files designed to run on the MIDP for PalmOS implementations from Sun and IBM. Deployment is supported via a deployment task and a corresponding HTTP servlet for Over-the-Air (OTA) provisioning. A small preprocessor allows to generate different variants of a MIDlet from a single source.
Of course you can also do much of that with the J2ME Wireless Toolkit or other Java IDEs, but using an Ant script results in a defined and reproducable build process that is independent of a particular programming environment. See this article for an excellent introduction to Ant as well as reasons for using it.
The Antenna tasks are mostly built around functionality provided by the Wireless Toolkit and thus require this software. If you want to make use of the obfuscation task, you should have one (or both) of the free RetroGuard and ProGuard obfuscators on your harddisk. Naturally, Ant itself is also needed, where version 1.5.0 seems to be the minimum required version as reported by users. Antenna works very well in Ant-supportive IDEs like Eclipse or JEdit.
Here is a list of tasks contained in the package:
Task | Purpose |
---|---|
WtkJad | A task that is able to create new JAD files from scratch or update existing ones. |
WtkBuild | An extension to Ant's standard javac task that sets the appropriate bootclasspath allows for preverification. |
WtkPackage | An extension to Ant's standard jar task that handles the JAD file correctly and is able to include complete libraries into the resulting JAR file. It also allows for preverification and obfuscation of the generated file. |
WtkMakePrc | A task to convert an existing JAR/JAD into a PalmOS PRC file that can be used with MIDP for Palm OS. |
WtkRun | A task to run a MIDlet suite contained in a JAR/JAD file in the Wireless Toolkit's emulator. |
WtkRapc | A task that invokes the BlackBerry rapc compiler, and generates BlackBerry .cod files. |
WtkPreverify | A standalone task for preverifying a set of classes. This task is normally not needed, since the build and packaging tasks include the same functionality. |
WtkObfuscate | A standalone task for obfuscating a JAR file. This task is normally not needed, since the packaging task includes the same functionality. |
WtkSmartLink | A task for removing unnecessary classes from a JAR file. |
WtkPreprocess | A simple Java preprocessor, similar to the ones known from C and other languages, that allows for conditional compilation and including source files. |
WtkDeploy | A deployment task that allows to put a MIDlet on a remote Web server for later download. |
WtkSign | A task for signing midlets |