<ANTENNA/>

Antenna

An Ant-to-End Solution For Wireless Java

Version 1.2.1

(c) 2002-2010


Erik Wetterberg
Sourceforge project


News | Overview | Download | Setup | JAD | Build | Package | MakePRC | RAPC
Run | Preverify | Obfuscate | SmartLink | Preprocess | Deploy | Sign | History |

Preverify

The WtkPreverify task provides a standalone preverification task. It is normally not needed, since the WtkBuild and WtkPackage tasks include the same functionality. Yet, people who don't like the "all-in-one" nature of the build and packaging tasks might prefer to apply the preverifier in a separate task.

WtkPreverify can operate either on directories or on JAR files, not both. If the input is read from a directory, the output will be written to a directory (that is, we are dealing with single class files). If the input is read from a JAR file, the output will be written to a JAR file. If, in the latter case, no output JAR is specified, the input JAR is overwritten. In addition, if a JAD file is specified, its "MIDlet-Jar-Size" key is updated.

Note: In the past, a number of users reported preverification failures. These should be fixed with Antenna 0.9.11. If you still have problems during preverification, please make sure that jar[.exe] (from the JDK) is in your path. Depending on the order and versions of JDKs and WTKs you installed, this might not be the case, making the preverify[.exe] utility from the WTK fail.

The task provides the following parameters:

Parameter Type Required Purpose
srcdir file Either of these two. The source directory, containing non-preverified classes.
jarfile file The source JAR file, containing non-preverified classes.
destdir file yes, if "srcdir" is being used The target directory to write the preverified classes to.
tojarfile file no, but can be combined with "jarfile" The target JAR file to write the preverified classes to. If not specified, the source JAR is overwritten.
jadfile file no The name of the JAD file that accompanies the JAR file. If the source JAR file is overwritten (no "tojarfile" being specified), the "MIDlet-Jar-Size" key in the JAD is updated when the task is finished.
bootclasspath path no Specifies the basic system classes that are needed by the application. Defaults to the MIDP API contained in ${wtk.home}/lib/midpapi.zip, or ${wtk.midpapi}, if specified.
classpath path no Specifies additional libraries that are needed by the application, but not part of the JAR file (for example libraries that are already available on a certain phone).
classpathref string no A reference to a classpath defined elsewhere.
bootclasspathref string no A reference to a bootclasspath defined elsewhere.
cldc boolean no If set to "false" then "-cldc" is not passed as a parameter to the preverifier. Defaults to "true".
nonative boolean no Can be used to allow/forbid certain langage features during preverification. If set to "true", then "-nonative" is passed to the preverifier. Please turn "cldc" off before. Otherwise this setting might have no effect.
nofloat boolean no Can be used to allow/forbid certain langage features during preverification. If set to "true", then "-nofloat" is passed to the preverifier. Please turn "cldc" off before. Otherwise this setting might have no effect.
nofinalize boolean no Can be used to allow/forbid certain langage features during preverification. If set to "true", then "-nofinalize" is passed to the preverifier. Please turn "cldc" off before. Otherwise this setting might have no effect.
if String no Provides fine-grained control over task execution based on a property definition. The task will only be executed if the given property is defined.
unless String no Provides fine-grained control over task execution based on a property definition. The task will only be executed if the given property is not defined.