Intellij #3273 and J2ME

I've just had a play with the built in support for J2ME trying to make an existing application developed under jBuilder build and run under emulation in IntelliJ.

The main things are notice are:

1. My app uses some third party library jars which appear to put on the class path for compile but not for preverify leading to warnings after rebuild. Manually setting a classpath in the JDK settings page fixes the problem.

2. I was expecting the midlet jar file produced to include the content of these libraries but it does not.

3. It fails to run with:

Error verifying method uk/co/igindex/igmad/finance/gui/midp2/DealerMidlet logoffNicely()V
Approximate bytecode offset 42: Inconsistent or missing stackmap at target

which leads me to suspect that the classes being used to run are not those output from the preverifier.

4. You specify a midlet and midlet icon with the path in the project for the icon file but when the JAD is build it doesn't appear to translate that path to the path in the jar and leaves that part of the JAD file blank.

Have I just configured it all wrong or are these real bugs?

Michael Cox

2 comments
Comment actions Permalink

Michael Cox wrote:

1. My app uses some third party library jars which appear to put on the class path for compile but not for preverify leading to warnings after rebuild.


This looks like a bug for me

Manually setting a classpath in the JDK settings page fixes the problem.
2. I was expecting the midlet jar file produced to include the content of these libraries but it does not.


That's what I would expect. I guess that the jars in the JDK are for
vendor profiles, like kddip, jscl, etc. They are already present in the
emulator and on the phone, thus not packaged in the jar.

cheers,
Dimitar

0
Comment actions Permalink

Hi, Michael

1. My app uses some third party library jars which appear to put on the

class path for compile but not for preverify leading to warnings after
rebuild. Manually setting a classpath in the JDK settings page fixes the
problem.

2. I was expecting the midlet jar file produced to include the content of

these libraries but it does not.

That is a bug but is it a common case to use libraries that aren't on the
phone already? If so please file a request to JIRA.

>

3. It fails to run with:

>

Error verifying method uk/co/igindex/igmad/finance/gui/midp2/DealerMidlet

logoffNicely()V

Approximate bytecode offset 42: Inconsistent or missing stackmap at target


I think that it happens because of the previous one.

4. You specify a midlet and midlet icon with the path in the project for

the icon file but when the JAD is build it doesn't appear to translate that
path to the path in the jar and leaves that part of the JAD file blank.

It's work fine for me. May be you didn't specify resourses dir for mobile
module?

Thanks.


--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"



0

Please sign in to leave a comment.