Share

Antenna

Tracker: Bugs

5 wtkpreverify not working on OS X with SUN WTK preverify bina - ID: 1938188
Last Update: Comment added ( omry_y )

I am using Antenna 1.0 on Apple OS X 10.5, with the SUN WTK jars as my
classpath and microemu.org as my emulator.

Although OS X is not officially supported by the SUN WTK, an apple
'preverify' ppc binary is distributed with the PhoneME project which works
fine (if not a little slowly).

When I use the wtkpreverify task like this

<wtkpreverify jarfile="${midlet.name}.jar" jadfile="${midlet.name}.jad" />

preverification fails with the output as if I had typed 'preverify -help'
on the command line. Looking at the verbose output of ant, I suspect that
there may be a typo in the invocation of 'preverify':-

[wtkpreverify] Preverifying
/Users/samuel/Documents/Java/Hello.J2ME/hello.jar
[wtkpreverify] Executable:
/Users/samuel/Documents/Java/Hello.J2ME/../tools/WTK/bin/preverify
[wtkpreverify] Arguments : -classpath
/Users/samuel/Documents/Java/Hello.J2ME/../tools/WTK/lib/midpapi20.jar:/Use
rs/samuel/Documents/Java/Hello.J2ME/../tools/WTK/lib/cldcapi11.jar:/Users/s
amuel/Documents/Java/Hello.J2ME/../tools/WTK/lib/jsr082.jar -d
/Users/samuel/Documents/Java/Hello.J2ME/9bc5c65f.tmp/Users/samuel/Documents
/Java/Hello.J2ME/hello.jar
[wtkpreverify] Usage: preverify [options] classnames|dirnames ...

Note that the -d parameter is missing a space between the output directory
and the input jar file! Is my analysis of this correct?

I have an ugly workaround for this... which is simply to call the preverify
executable directly and hard code the classpath jars. So instead of the
nice task call above, I use this monstrosity...

<mkdir dir="preverify.tmp" />
<exec executable="${wtk.home}/bin/preverify">
<arg line="-classpath
${wtk.home}/lib/cldcapi11.jar:${wtk.home}/lib/midpapi20.jar:${wtk.home}/lib
/jsr082.jar" />
<arg line="-d preverify.tmp" />
<arg line="${midlet.name}.jar" />
</exec>
<move file="preverify.tmp/${midlet.name}.jar" tofile="${midlet.name}.jar"
/>
<delete dir="preverify.tmp" />

Please let me know if there is anything else I can do to help you debug
his.


Sam Halliday ( samhalliday ) - 2008-04-08 22:58

5

Closed

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )




Date: 2008-06-22 05:44
Sender: omry_yProject Admin


accepted patch into CVS.
it will be publicly available with the next release (which may take some
time as I just released yesterday).
for now checkout from CVS.


Date: 2008-06-21 23:16
Sender: francisdb


Can somebody please commit this patch? The pyx4me maven plugin is also
broken on mac because of this issue.


Date: 2008-04-25 01:07
Sender: harry_evans


I fixed this in my local version by modifying
src/de/pleumann/antenna/misc/Utility.java. Basically, the way the
arguments are constucted, if no params are added between the destination
director and the source arg, no space will get put between these items to
separate them. Below is a diff, from the 1.0 src download and my local
copy with the fix. All I did was make it consistently apply a space before
adding a new param.

I wasn't sure which format to provide the changes in, so the diff is
first, and the RCS formatted version is second.

Harry

Diff format:

813c813
< arguments += " -cldc1.0 ";
---
> arguments += " -cldc1.0";
818c818
< arguments += " -cldc1.0 ";
---
> arguments += " -cldc1.0";
827c827
< arguments += " -target CLDC" + cldcVersion + " ";
---
> arguments += " -target CLDC" + cldcVersion;
833c833
< arguments += (cldc ? " -cldc " : " ");
---
> arguments += (cldc ? " -cldc" : "");
837c837
< arguments += "-nofinalize ";
---
> arguments += " -nofinalize";
839c839
< arguments += "-nofloat ";
---
> arguments += " -nofloat";
841c841
< arguments += "-nonative ";
---
> arguments += " -nonative";
843c843
< arguments += source;
---
> arguments += " " + source;

RCS format:
d813 1
a813 1
arguments += " -cldc1.0";
d818 1
a818 1
arguments += " -cldc1.0";
d827 1
a827 1
arguments += " -target CLDC" + cldcVersion;
d833 1
a833 1
arguments += (cldc ? " -cldc" : "");
d837 1
a837 1
arguments += " -nofinalize";
d839 1
a839 1
arguments += " -nofloat";
d841 1
a841 1
arguments += " -nonative";
d843 1
a843 1
arguments += " " + source;


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2008-06-22 05:44 omry_y
close_date - 2008-06-22 05:44 omry_y