Configuring the MobileSDK

How does one know how to set up a MobileSDK that IntelliJ can use. On OSX we have the ability to build J2ME applications now but I have no idea how to put all the pieces into the right place that IntelliJ would expect it. What is the directory structure or other that IntelliJ is looking for so I can adjust my /j2me directory accordingly and move on with building my application?

4 comments
Comment actions Permalink

Hi,
What do you mean under "ability to build J2ME applications"? MIDP Reference
Implementation (http://mpowers.net/midp-osx/) ?
Thank you.

"Gregory Pierce" <no_mail@jetbrains.com> wrote in message
news:24356677.1105479531751.JavaMail.itn@is.intellij.net...

How does one know how to set up a MobileSDK that IntelliJ can use. On OSX

we have the ability to build J2ME applications now but I have no idea how to
put all the pieces into the right place that IntelliJ would expect it. What
is the directory structure or other that IntelliJ is looking for so I can
adjust my /j2me directory accordingly and move on with building my
application?


0
Comment actions Permalink

I'll do better than that. I'll post a HOW TO that allows OSX developers to get things working.


1) You will need a Windows, Linux box since Sun is stupid enough to pack the J2ME WTK in an executable. Once you can extract that install you'll have a directory like c:/WTK22

2) Copy this to your Mac "AS-IS". I put mine in /javalibs/WTK22

3) IntelliJ won't treat the mpowerplayer developer directory as a WTK so when you're in the JDK/Libraries thing creating a new mobile SDK, choose this directory

4) The only thing that isn't crossplatform (cleanly) is the preverify application. You can get the latest in mpowerplayer http://developer.mpowerplayer.com/. Copy the preverify executable to the same place as the windows and linux executables so you'll know IntelliJ will launch the right thing.

5) Go to the command prompt and actually try to run preverify as it depends on some open source libraries that may (but most likely aren't) installed on your machine. The one my machine was missing is libpool. You can use fink.sf.net to install any libraries that preverify says is missing. Once its running and giving you options - preverify works and you can move on. Don't depend on Iridia to tell you that preverify didn't work - because for some reason the J2ME build process doesn't output any messages (and closes the messages window when it closes so even if there were some you wouldn't see them)

6) There were two application properties which Iridia didn't include when building my jad file: MicroEdition-Configuration and MicroEdition-Profile. These should be added as option settings under the Mobile module settings.

7) Iridia doesn't have a clean mechanism for putting in midlets in the run/debug console so don't forget in the mobile module settings to add something or else you'll get an error when it tries to run the midlet as there won't be a midlet defined.

After you do this your application will build and you'll get a .jar and .jar file that work fine on the Windows WTK22. There may be some issues that prevent mpowerplayer from working as it will complain about various properties being missing when in reality they aren't. These may be fixed in a later mpowerplayer release (hopefully).


You now have the ability to build MIDP applications right from IRIDIA #3144.

0
Comment actions Permalink

3) IntelliJ won't treat the mpowerplayer developer directory as a WTK so

when you're in the JDK/Libraries thing creating a new mobile SDK, choose
this directory

Yes. To use IDEA for J2ME development you have to have some emulators. And
only directory with emulator can be the home directory for Mobile SDK.

I can solve your problems with .exe in WTK but do you REALLY need it? If you
work in Windows or Linux (you have to have "boxes" in any case) you can use
vendors emulators - and often it's better to work with them

6) There were two application properties which Iridia didn't include when

building my jad file: MicroEdition-Configuration and MicroEdition-Profile.
These should be added as option settings under the Mobile module settings.

Because you didn't properly configure your Mobile SDK. These properties are
not settings of your module - but settings of your emulator!

7) Iridia doesn't have a clean mechanism for putting in midlets in the

run/debug console so don't forget in the mobile module settings to add
something or else you'll get an error when it tries to run the midlet as
there won't be a midlet defined.

Do you mean that you have an error "no midlets ... in jad"?

After you do this your application will build and you'll get a .jar and

.jar file that work fine on the Windows WTK22. There may be some issues that
prevent mpowerplayer from working as it will complain about various
properties being missing when in reality they aren't. These may be fixed in
a later mpowerplayer release (hopefully).
>

You now have the ability to build MIDP applications right from IRIDIA

#3144.

Thank you for investigation :)

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




0
Comment actions Permalink

Greetings Gregory!

I wonder if you happen to have a solution for IntelliJ 6.0? I've pinged their support and it doesn't sound good.

I just switched to a Mac and I love it (25-year MS / Wintel user). But not being able to do J2ME (easily) from IntelliJ is a bit depressing.

Look most forward to your comments.

Best Regards,

Bruce

0

Please sign in to leave a comment.