English 中文(简体)
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 LWUIT 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





相关问题
add text in http request string url

ok i made a midlet through which i can connect to server pages and get soem information as response. For example i made a midlet through which i acced url: http://example.com/?u=nepal&t=1 Now i ...

Do I have to do a setSize() on a Vector before using it?

Given private final Vector v = new Vector(); //instance variable the following 3 lines are in an instance method in the same class. 1. int length = v.capacity(); 2. int size = v.size(); ...

Is the situation with Java ME improving?

It seems to be the consensus that developing for Java ME is not as cross platform as you might expect, particularly compared to say java SE, but it is difficult to assess how the situation is evolving....

Privileged operations in netbeans mobility

I m writing a Java ME app that will use privileged operations such as messaging. By default the user is prompted to confirm each of these operations, but I would like to run it as a background ...

ClassFormatError: 56 while using hessian in j2me

I am trying to use the hessian j2me implementation @ http://hessian.caucho.com/ using java me sdk 3.0. http://hessian.caucho.com/doc/hessian-overview.xtp#Hessian%20Client%20for%20a%20cell-phone ...

热门标签