Apr 7, 2010

How to Set Up Java ME on Mac: A way to do it.

Hi all,

Since January, I have switched from my old HP Pavilion (WinXP) to a brand new MacBook Pro (Mac OS X). Such as people use to say on the Internet: I am switcher. I particularly have no issues with Windows. My decision to switch to a Mac was just a matter of learning a new platform.

Anyway, this post is not about my experience on this new platform as a user. In fact, I would to to share with you my experience on how to get Java ME up and running on Mac.

To be honest, set up Java ME on Mac is not a difficult task to accomplish, since now we have an official Mac support by Sun Microsystems, regarding Java ME Platform SDK 3. As a matter of fact, the process is equal to the one performed on Windows, for instance. That said, your first step is to download the SDK from Sun's website and then install it in your "Applications" folder.

Get it done and now you have to download Eclipse IDE and EclipseME plugin. You can download both separately or opt for downloading Eclipse Pulsar. Eclipse Pulsar is a distribution of Eclipse targeted for mobile Java development which contains already comes with EclipseME pre-installed.

Once you have Eclipse and EclipseME installed, now it is time to configure some parameters. The first step is to assign the SDK (former WTK) path on EclipseME. Go to menu Eclipse > Preferences > Java ME and enter path "/Applications/Java_ME_SDK_3.0.app/Contents/Resources" in the field "WTK Root". The second step is to import the emulators from Java SDK directory into EclipseME. To do it, go to menu Eclipse > Preferences > Java ME > Device Management and press the button "Import". In the field "Specify search directory",  enter the same path as "WTK Root" field. Now, press "Refresh" button and the plugin will search for all the emulators. As soon as this search completes with some result, press "Finish". For more detailed and advanced configurations on EclipseME, check at http://eclipseme.org/docs/configuring.html. To conclude, close the "Preferences" window, by pressing "OK".

Now that you have the environment installed and configured, let's get a sample application running. To do it, you will have to create a simple MIDlet. For instance, create the "Hello, Mac World!" MIDlet, which displays the text "Hello, Mac World!". Considering you have created the file HelloMacWorldMIDlet.java, now let's run the MIDlet. Control + Click on MIDlet file, navigate to menu Run As > Emulated Java ME MIDlet. That's it! Now you have a MIDlet up and running on a Mac. Congratulations!!!

Did you think it was a tough mission, didn't you?


I hope you have enjoyed this micro tutorial. Any doubt, comment here!

See you in the next post...

43 comments:

Ernani Joppert said...

I am having issues with String class it wont recognize the overloaded methor valueOf(double), it always complains about only seeing valueOf(char)....can't make it compile for some reason

Reimar Twelker said...

I had the same problem with Math.PI and others...

It seems that Eclipse loads the libraries for CLDC 1.0 (no floating point support) before CLDC 1.1 and ignores the latter.

Go to your project properties -> java build path -> libraries and add the external CLDC 1.1 library. Next, go to the order and export tab and move the CLDC 1.1 library to the top of the list or at least above the Java ME SDK 3.0 libs.

This should make String.valueOf(double) etc. available.

Cheers, Reimar

Reimar Twelker said...

Instead of using the work-around above, you can go to the J2ME settings -> device management and select the device you would like to use, e.g. "DefaultCldcPhone1". Then, in the "Edit" window of the device, go to the libraries tab. On my system, the files cldc_1.0.jar and cldc_1.1.jar are at the top of the list. Interesting: the "APIs" columns of both files read "CDLC-1.1" which can t be right... anyway, removing the cldc_1.0.jar from the list solves the problem.

john son said...

Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!..Thanks for sharing this wonderful blog..

JAVA J2EE Training in Chennai

JAVA Training in Chennai said...

recently, i bought a mac air laptop and tried to install java. You article me helped me a lot in setting Java environment on my Mac system.

jhansi joe said...


Thanks for sharing your view to our knowledge’s, its helps me plenty keep sharing…
JAVA Training in Chennai

Success Best said...

SAP stands for Systems Applications and Products in Data Processing. SAP is one of the leading ERP software in the world. SAP Training Institute in Chennai .
SAP has been widely used by large to very large organizations and also by SMEs to manage their business processes.

Success Best said...

The SAS system is a powerful software program designed to give researchers a wide variety of both data management and data analysis capabilities. SAS Training in Chennai Although SAS has millions of users worldwide.

dhanamlakshmi palu said...

The great and valuable information are here.It is very easy to tell about overall performance.I like this article so much. Thank You.
PHP Training in chennai | PHP Training chennai | PHP course in chennai | PHP course chennai

Naren said...

Hello,

I have tried the same procedure , but at last step "Run As > Emulated Java ME MIDlet. That's it! Now you have a MIDlet up and running on a Mac."

At my mac the emulator is not opened , it show some message in console as below . Please help me.

Naren said...

Syntax: emulator [arguments] In order to get commands supported by given device run: emulator.exe -Xdevice:<device name> -Xquery Generic list of arguments is: -version Display version information about the emulator -help Display list of valid arguments -classpath, -cp The class path for the VM -D<name>=<value> Set a system property -Xdebug Use a remote debugger -Xrunjdwp:[transport=<transport>,address=<address>,server=<y/n> suspend=<y/n>] Debugging options -Xdevice:<device> Select a device skin for the emulator -Xdomain:<domain_name> Set the MIDlet suite's security domain -Xdescriptor:<JAD file name> The JAD file to be executed -Xjam[:install=<JAD file url> | force | list | storageNames | run=[<storage name> | <storage number>] | remove=[<storage name> | <storage number> | all]] Java Application Manager and support for Over The Air provisioning (OTA) -Xquery Print device information -Xautotest:<JAD file url> Run in autotest mode

Amirtha rao said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.

sas training in Chennai | sas training institute in Chennai

Andrew Son said...

The information you have given here are most worthy for me. I have implemented in my training program as well, thanks for sharing.

Hadoop Training Chennai
Hadoop Training in Chennai

Roshini RS said...


I have read your blog, it was good to read & I am getting some useful info's through your blog keep sharing... Informatica is an ETL tools helps to transform your old business leads into new vision. Learn Informatica course in Chennai from corporate professionals with very good experience in informatica tool.
Regards,
Informatica training in chennai|Informatica courses in Chennai|Informatica institutes in Chennai|SAP training in chennai

Pooja Doss said...

Oracle DBA Training in Chennai
Thanks for sharing this informative blog. I did Oracle DBA Certification in Greens Technology at Adyar. This is really useful for me to make a bright career..

Pooja Doss said...

Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
Websphere Training in Chennai

Pooja Doss said...

Data warehousing Training in Chennai
I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..

Pooja Doss said...

Selenium Training in Chennai
Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

Pooja Doss said...

Oracle Training in chennai
Thanks for sharing such a great information..Its really nice and informative..

Pooja Doss said...

I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job.
SAP Training in Chennai

Pooja Doss said...

This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post,thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
Android Training In Chennai In Chennai

Pooja Doss said...

Pretty article! I found some useful information in your blog, it was awesome to read,thanks for sharing this great content to my vision, keep sharing..
Unix Training In Chennai

Pooja Doss said...

I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
SalesForce Training in Chennai

Pooja Doss said...

There are lots of information about latest technology and how to get trained in them, like Best Hadoop Training In Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this blogs..

Dinju Thomas said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..
Selenium Training in Chennai | QTP Training in Chennai

Dinju Thomas said...

Thanks for Information Oracle Apps Technical is a collection of a bunch of collected applications like accounts payables, purchasing, inventory, accounts receivables, human resources, order management, general ledger and fixed assets, etc which have its own functionality for serving the business
Oracle Apps Training In Chennai

Dinju Thomas said...

Oracle Training in chennai | Oracle D2K Training In chennai
This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

Rashmi D'souza said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

Perl training in chennai

caroline jesi said...


I have read your post, it was good to read & I am getting some useful info's through your blog keep sharing...
Regards,
ccna institutes in Chennai|ccna courses in Chennai|ccna training in Chennai

geethu said...

Great content. I really enjoyed while reading this content with useful information, keep sharing.
Hadoop Training in Chennai | Hadoop Training Chennai | FITA Velachery | FITA Academy Chennai.

Diya Patel said...

Best SQL Query Tuning Training Center In Chennai This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

Gopi Perumal said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
Regards,

Regards,
CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

Big IT Trainings said...

SAP UI5 Online Training

M Sunny said...

IVR Plugin is a powerful IVR software for interactive voice response, voicemail & call attendant phone systems so please visit site

Nikshitha S said...

Updating with the latest technology and implementing it is the only way to survive in our niche. Thanks for making me this article. You have done a great job by sharing this content in here. Keep writing article like this.
SAS Training in Chennai | SAS Course in Chennai

Nikshitha S said...

The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.
Angularjs Training in Chennai | Angularjs training Chennai

for IT the said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

Java Online Training Java Online Training Core Java 8 Training in Chennai Core java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

for IT the said...

Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

for IT the said...

Java Training Institutes Java Training Institutes Java Spring Hibernate Training Institutes in Chennai | Hibernate Training Institutes in Chennai Spring Training Institutes in Chennai Spring Training Institutes in Chennai

jazz said...

This is a great article, I have been always to read something with specific tips! I will have to work on the time for scheduling my learning.
Selenium Training in Chennai

Sanjana E said...

It is important to note that Java ME SDK 3.0 for Mac OS requires Java 1.6. Make sure 1.6 is set as the default runtime in Java Preferences.

Aswin Karthick said...

Thank you very useful java training in chennai, matlab training in chennai, struts training in chennai

sobiga J said...

Thank you !! Amazing Write Up !!
Robotics training in chennai
Php training in chennai
Ieee electrical projects in chennai
Final year java projects chennai
Digital marketing company in chennai
Chennai to Tirupati Package cheap and best travels
Chennai car rental outstation