Amit Yadav
Amit Yadav

Reputation: 35114

J2ME preverify StackMap missing

I have been developed one utility named, Ticker.

I packed in a Jar and try to use in different project.

I am using Eclipse. At the time of creating binary (JAD/JAR) I am getting pre-verification error.

After that I tried one workaround. I create binary and manually inject required classes in it.

When I tried to run on Sun Emulator (WTK 2.5 DefaultColorPhone) getting pre-verification error. On the other hand build is working fine on KEmulator (all you know KEmulator run on JVM rather than KVM).

Subsequently, I looked in a lib and found classes are not verified.

Then I do verification using WTK preverify.exe; but what I noticed out of 4, 2 classes are not pre-verified (StackMap entry is missing).

Class Hierarchy

Please get me rid of that.

Amit

Upvotes: 0

Views: 175

Answers (1)

Telmo Pimentel Mota
Telmo Pimentel Mota

Reputation: 4043

In the past I have done this by creating an Ant script with Antenna:

. compile the java source
<wtkbuild srcdir="./src" destdir="./classes" preverify="false"/>

. copy your resources
<copy todir="./classes">
<fileset dir="./res"/>
</copy>

. extract the library jar
<unjar src="./lib/Ticker.jar" dest="./classes"/>

. preverify everything
<wtkpreverify srcdir="./classes" destdir="./classes"/>

. package your jar file
<wtkpackage jarfile="myapp.jar" jadfile="myapp.jad">
<fileset dir="./classes"/>
</wtkpackage>

Upvotes: 0

Related Questions