tags:

views:

183

answers:

3

Hi ,

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 LWUIT with antenna tools?

I checked the Button class, but it seems ok.

Any ideas?

Thanks,

Yaniv

A: 

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

kgutteridge
A: 

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.

Paul
A: 

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).

tonys