views:

493

answers:

3

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

+1  A: 

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.

baris_a
Thanks for the reply, I'm hopping not to do that, but... I think it has to be a way to do it
Santiago
A: 

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.

omermuhammed
A: 

Hi,

CAnu please say me wr we get sources and how can we change as precompiler headers please

sam