Updated on: 2008-06-29
To install and setup Netbeans 6.1 on Mac is no problem. Running a J2EE or J2SE application would then be fairly similar to Windows. But running J2ME has a little problem.
To work with mobile application, one can follow the helpful Netbeans + Mobility + Mpowerplayer Guide. However, the guide did not cover how to add optional java package such as jsr75, which I would cover below.
The complete steps to set up a mobile development environment with Netbeans + J2ME Mobility Pack + Visual Designer + Mpowerplayer emulator + optional java package:
Download Netbeans 6.1 IDE for Mac OS X.
Install either the Java SE or Web & Java EE version of the IDE.
After installation, start the IDE and go to Tools > Plugins.
Click the Available Plugins tab. Under Category go to Mobility.
Check the boxes for Visual Mobility Designer, and Mobility and click Install.
Download the Mpowerplayer SDK and install it.
In the NetBeans IDE main menu, choose Tools > Java Platform Manager.
Click Add Platform. Select the folder that contains the MPowerPlayer SDK (mpp-sdk). Click Search to locate the emulator in the folder. When the IDE finds the MPowerPlayer SDK, click Next.
Click Finish. The IDE registers the MIDP platform. You can now build and run a MIDP 2.0 application. But the setup still lacks optional java packages.
Download SUN WTK 2.5.2 (for Windows and Linux)
- Unzip the .bin. For example, run the command:
$ unzip sun_java_wireless_toolkit-2_5_2-linux.bin
Under /lib, copy the optional java package you need eg. jsr75, jsr 179 or even midpapi21.jar. Put them under /Applications/mpp-sdk/stubs/
- In your project, edit project.properties and add to platform.bootclasspath the optional java package. eg.
- Begin mobile development on Mac OS X!
In step 13, editing the platform.bootclasspath property is only a temporary solution. The drawback is that when ever you change/view the project properties, platform.bootclasspath will revert back to its original.. What I do is to comment my edited platform.bootclasspath (with a #) and copy and paste it whenever the property is reverted.