MIDP 1.0 in EclipseME 1.5.0
Yesterday, I was having trouble getting MIDP 1.0 going on EclipseME. My steps to getting it working were pretty rough, but Craig Setera responded to my mailing list inquiries with a more straight-forward approach:
- Open J2ME Device Management Preferences.
- Duplicate the device which most closely matches what you want, such as DefaultColorPhone.
- Edit the new device
- Edit the Device Name to something more recognizable, like DefaultColorPhone MIDP1.0/CLDC1.0.
- Edit the Launch Command Template to hardcode a device name that the WTK will accept, instead of the new device name:
-Xdevice:%device%
becomes-Xdevice:DefaultColorPhone
. - Switch to the Libraries tab.
- Add the jars for the older specs:
cldcapi10.jar
midpapi10.jar
wma11.jar
- Remove the jars for the newer specs:
cldcapi11.jar
midpapi20.jar
wma20.jar
- Save the changes to the preferences.
- Restart Eclipse. This seemed necessary to get the Launch Command reloaded.
- Edit your project properties, and switch to the new device profile.
- Rebuild project.
At this point, I was happily up and running again.
On a side note: I was working in a new workspace to test this, so I had to do a fresh checkout of my project from SVN and create a J2ME Midlet Suite project from it. This process had been very painful in much older versions of EclipseME and Subclipse. I was never sure which package was causing the errors, but today, it works just fine. I'm pleased, because getting another person's enviroment setup won't take the hand-holding and black magic it once did.
Filed Under: Java