Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Preverification failed with Antenna

 
Xu Song
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using antenna package for my J2ME project.The antenna-bin-0.9.13.jar is put under lib directory of my simple project,and '<property name="antenna.home" value="lib\antenna-bin-0.9.13.jar"/>' is defined in build.xml.
The compiling works well.I failed on preverfication.The error message is:
'Preverification failed (result=1)'.Then I use WTK's command line tool--preverify.exe,the preverification is success.
Your response would be appreciated very much.

regards,
Xu Song
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works for me. I think you might have some settings wrong. Environment vars or ant script.
 
Xu Song
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True,there's a mistake in my build.xml.
In the <wtkpackage> task,if obfuscate is set with 'false',then the preverify should be 'false' as well.Because there's no .jar file existing in the project,it'll prompt "Preverification failed (result=1)" if preverify is set as true.
Solution:Set preverify in <wtkbuild> task as 'true'.If I obfuscate the built .jar file in <wtkpackage>,I got to set preverify as true in <wtkpackage>.

The tool is quite flexible,isn't it?
Xu Song
 
Raja Nagendra Kumar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There seem to be bug in Antenna Code..

by replacing the parameter env with null in

de.pleumann.antenna.misc.Utility#preverify

method

i.e look for line Process proc = Runtime.getRuntime().exec(preverify + " " + arguments, env); and make it to Process proc = Runtime.getRuntime().exec(preverify + " " + arguments, null);

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-Offshore Java Product Optimization Excellence
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic