开发者

Fail to preverify LWUIT with Antenna

I am using the LWUIT library (j2me). When I compile the code with my IDE (intelliJ) everything compiles and runs fine, but when I'm building it with Antenna (latest version), I fail on the preverify task.

The log says the following: Error preverifying class com.sun.lwuit.Button VERIFIER ERROR com/sun/lwuit/Component.drawPainters(Lcom/sun/lwuit/Graphics;Lcom/sun/lwuit/Component;Lcom/sun/lwuit/Component;IIII)V: Cannot find class java/lang/ref/Reference

Did anyone succeeded preverifying LWUI开发者_如何学CT with antenna tools?

I checked the Button class, but it seems ok.

Any ideas?

Thanks,

Yaniv


I had the very same problem.

Add the following before your wtkbuild or wtkpreverify

<property name="wtk.all.enabled" value="true"/>

In a nutshell you need certain libraries/JSR's to preverify your code which need to be in the classpath. Antenna adds only the ones you specify and by setting the above propertie you add all.


The most likely problem is that you are building against a CLDC 1.0 library (e.g. cldcapi10.jar if you're using WTK 2.5.2).

java.lang.Reference is a CLDC 1.1 class - LWUIT requires CLDC 1.1 because it uses WeakReference all over the place (as well as a couple of other 1.1 only features).


Usually caused when you have not included one of the required libraries, at a guess you have most likely omitted the svg classes from your classpath


There is a bug in MTJ version that you are using . You can try updating MTJ with this

http://download.eclipse.org/mtj/updates/1.1.2/stable/ and this

http://download.eclipse.org/eclipse/updates/3.6

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜