This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Maybe you could give J2ME Polish a try, which is also an Ant based tool like Antenna. Since J2ME Polish autmatically adds device specific APIs to the classpath during compilation, preverification and obfuscation, it's easier to cope with such APIs.
I'm using antenna with various devices, nokia included, you need put your nokia classes.zip into your bootclasspath.
Joined: Mar 13, 2004
I made a zip file, which includes nokia api and standard api. All apis what I need is included. Theres no problem with libraries, it compiles without mistake. I think problem lies in preverification.
Joined: Nov 14, 2000
Antenna is using wtk doing its, jobs, and wtk has its own thinking way.
I had exact the same pre-verification error when we did the similar things like you. Please don't customize the libraries!!!
You may need to reinstall Java, ant and wtk to undo your mistake. And it might not work either. I don't know why . I made one j2me programmer's machine work, but not the other. I had to switch a C++/symbian programmer's machine with one of our j2me programmer's machine to have undone that.
Of course, reformat the hard disk will always work!
This woke up a couple of neurons. If they serve me correctly, we had that error a while back when using Antenna 0.9.11.
Everything was fine with Antenna 0.9.10/WTK1.0.4/J2SE1.4.2_03 on Linux (SUSE 9.0). But moving to Antenna 0.9.11 caused the error. At the time the little digging around I did suggested that with 0.9.11 Jorg (Antenna's author) changed the WtkPreverify Ant task to have a new JAVA_HOME variable to try and fix some strange preverification issues that had something to do with the bin/jar executable. I don't know if the current Antenna 0.9.12 has the same issue, because, err, I'm (still) happy with 0.9.10, and I'm leaving well enough alone!
Since you find that preverificiation via WTK works, you might try using Antenna 0.9.10 and see if that fixes the problem.
Hope that helps - came across this in January - but still remember the frustration. I can't even remember if I fired off an email to Jorg (oops)
Hi I am using antenna 0.9.12 and just faced a similar problem. Now I seems have solved (hopefully ). I simply add the path to jar.exe (probably locate in JAVA_HOME) to my path env variable, restart all related apps and it works.
Besides, I used to preverify the Jar file instead of classes, anyway, don't know whether it matters