1

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

Yaniv
  • 11
  • 1

4 Answers4

1

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
  • 4,812
  • 3
  • 27
  • 38
1

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
  • 3,855
  • 33
  • 39
0

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

Rahul
  • 172
  • 1
  • 4
0

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
  • 8,727
  • 1
  • 18
  • 23