Developing Java ME on Mac
By seapegasus on May 28, 2008
As Karel already mentioned a few weeks ago, the Mobility pack can also be used on MacOS. (The mobility pack is written in Java and does run on Mac OS, but there is no current official WTK and no emulators for Mac OS, so netbeans.org never offered this download option.) Since people asked about it, I tried to install the third-party SDK and emulator and ran a sample app, and ta-daa, it worked. :) Here are a few "Doh!"s I came across, I'll write them down in case somebody else has the same questions.
- Installing NeBeans Mobility pack for Mac
- There is no download explicitly labeled "Mobility pack of NetBeans for Mac OS" or so on the NetBeans Installer page. Instead you download any other Java edition for Mac OS, for instance the Java SE edition. (Or use the one you already have.)
- Then you go to the Tools>Plugins menu, and install (at least) these two plugins: "Mobility" and "Visual Mobility Designer" (you can also install other items you need).
- In other words, don't look for a plugin explicitly called "mpowerplayer" or so. The Mac integration is part of the normal "Mobility" plugin now.
- Installing mPowerPlayer
- Next download the SDK for Mac OS -- click the "Get the SDK: Download..." link.
- Then download the emulator for Mac OS -- click the "free download" button.
- Remember the directory where you downloaded the stuff to. :-) The SDK is saved as mpp-sdk, the emulator is called mpowerplayer.app. I copied them into the "/Applications/" directory.
- Telling NetBeans where to find the JavaME platform
- Go to the IDE's platform manager (Tools menu) and add the mpp-sdk as a "Java MIDP Platform emulator". (If needed you can get more details how to do that on the FAQ).
- When you now create a new Mobile project, the MPowerPlayer SDK and QVGA device will show as options.
- You cannot use the CDC framework yet, this implementation is only meant for CLDC/MIDP.
- You get a working emulator together with mpowerplayer, but it's only one. This is because emulators are released by phone companies, but they never released any for Mac OS. So you have to go back to a PC (e.g. on a virtual machine) to get one emulator for each type of phone if you want to do any serious crash-testing of your mobile apps.
- Tip: Instead of using different emulators, you can test the app on actual devices that you have. Use the help menu in the IDE and search for "deploy to mobile device" to learn more, but some devices don't come with software to connect to Mac OS, so you may be out of luck.