Question

I'm trying to develop a portable J2ME appli, but Netbeans do a class preverification of LWUIT library that uses optional APIs that some configurations don't have, so I get this error when I try to compile on a configuration without JSR-184 (M3G Optional API):

Error preverifying class com.sun.lwuit.animations.Transition3D VERIFIER ERROR com/sun/lwuit/animations/Transition3D.initTransition()V: Cannot find class javax/microedition/m3g/Node

I don't want to remove the classes from the LWUIT API because that classes works on other configurations compatibles with JSR-184

What I want is that NetBeans do not preverify the library, It is posible?

Here are some code:

//#ifdef JSR184
//# import com.sun.lwuit.animations.Transition3D;
//#else
import com.sun.lwuit.animations.CommonTransitions;
//#endif

        Transition out;
//#ifdef JSR184
//#         out = Transition3D.createRotation(500, true);
//#else
        out = CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 500);
//#endif
        setTransitionOutAnimator(out);

Thanks

Was it helpful?

Solution

We had the similar problems, as I remember BlackBerry handsets are problematic (?) for this JSR-184. What I did to solve this problem, I created different configurations for different targets and removed this problematic classes from LWUIT library, rebuild library for that target, and also modified project settings of related configuration accordingly. Hope it helps.

OTHER TIPS

There is a native blackberry port of LWUIT as well as quite a few tutorials and instructions on how to use it. The native port uses native RIM API's which work far better on the blackberry devices than MIDP API's.

LWUIT's use of 184/226 doesn't bother devices that don't support these profiles other than blackberry which has a broken classloader implementation.

It may be possible, though I havent tried it. Netbeans has two xml files, build.xml and build-impl.xml. Look at these files and look for preverify task, then you can do a bit of testing and ensure that it doesnt preverify the library.

Netbeans ant plugin is a pretty simple setup and you can change it which ever way you want to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top