Archive for the ‘OSX’ Category

J2ME Polish Setup on OS X

So I just spent the night fighting with setting up a J2ME environment on Mac OS X. It turns out it’s actually pretty easy once you know. So here is what I did.

1. Download and install Eclipse. I used version 3.3 but I think anything above and including 3.2 should work.

2. Install MPowerPlayer. It is a pure java emulator so it runs on OS X. Version 1185 can be downloaded here.

3. Follow the instructions to install Mepose. The instructions are pretty good except don’t mention to also set the MPP (MPowerPlayer) directory. I installed it at /opt/mpp-sdk

4. Setup one of their sample applications using the provided instructions. Contrary to the instructions, they now have many sample projects. I chose to import (not install and copy like the instructions say) the project called ‘chartitem’.

  • Select ‘import’ and ‘Existing Projects into Workspace’
  • Select ‘chartitem’ from the samples directory
  • Click the checkbox called ‘Copy project into workspace’

5. Now create a new ‘J2ME Polish Project’ with the exact same name as the project your just imported. See these instructions here. This will update the imported project to be a Mepose project.

When you get to ‘Select Target Devices’ section, select ‘Devices > Virtual > Generic/MppPhone’

6. Now run your new app. Ctrl click on your MidLet file (Should be called and select ‘Run As > J2ME Polish MIDLet’

7. If you’re just like me, you got an error. My env was looking for the preverify executable at /opt/j2me/bin/preverify. Rename the previous previous bin to preverify.old and make a symbolic link to the preverify for mmp-sdk: ln -s {mpp-sdk home}/osx/preverify/preverify preverify.

Now build again and you should be golden. Enjoy.

It might be necessary to install the linux version of J2ME Wireless Toolkit in order to use JSR75. I’ll look into it and update this post when I know more. Related links: