Hello everybody,

> I am wondering if I can use BCEL to modify J2ME MIDlets since any bytecode
> modification in J2ME would require running a J2ME verifier on the modified
> bytecodes. My understanding is that J2ME preverification involves
> computing
> StackMap attributes. Does BCEL automatically take care of recomputing and
> updating StackMap attribute in the case of J2ME MIDlets ?

I�m working on that way, modifing J2ME MIDlets bytecode. I could modify
MIDlets bytecode but when I tried to run it on any emulator or on a mobile
device errors appeared. The problem is that the class files need a StackMap
for the KVM classfile verification. This new attribute (StackMap) is defined
by "KVM Specification" but not by "The Java Virtual Machine Specification".

BCEL includes a class for managing StackMaps
"org.apache.bcel.classfile.StackMap", then the only thing to do is update
that attribute to its new value. I�m working around this but, so far, I�m
not success.

> If not, is anyone aware of J2ME MIDlet verifier similar to JustIce for
J2SE?

BCEL has also a verifier. I tried it but it only checks your bytecode and
notices to you if it passes the checking.


Thanks,
Jose


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to