This is a simple How-to on setting up your J2ME development environment.
These are the pre-requisites to be downloaded.
- Sun WTK
- Eclipse Pulsar
Sun WTK: http://java.sun.com/products/sjwtoolkit/
I am using WTK 2.5_02
The Sun Java Wireless Toolkit (WTK) for CLDC emulates a J2ME environment on your computer. There are other emulation environments available, but most are built from the Sun WTK.
1. Visit the Sun Java Wireless Toolkit page
2. Click on the latest toolkit
3. On the new page hit the "Download" button
4. On the new page accept the license and click on the link for your platform (e.g. Windows)
5. Once downloaded, run the installer. Recommend to accept Default Location
There is another Open Source implmentation of MIDP profile called J2ME Polish.
Eclipse Pulsar: www.eclipse.org/pulsar/
If you do not already have Eclipse Pulsar download and install it. The base installation package for Java development is all you need.
Eclipse Pulsar is a customized Eclipse version meant specially for mobile/j2me developers. It contains all J2ME plugins by default.
Settings in Eclipse:
1. After restarting Eclipse, Goto,
Window -> Preferences -> Java ME -> Device Management -> Import..
2. Browse for your Sun Wireless Toolkit Installation Path and Click OK.
3. Check DefaultColorPhone Type device and Click OK in Preferences Dialog Box.
Import The project:
If you have any sample J2ME projects you can,
Goto File -> Import -> General -> Existing Projects into Workspace
- Select the Project Source code Zip file
- Click OK.
- The project is copied in the workspace.
To Run the project:
- Right Click your Project in Eclipse and Select Run As -> Emulated JavaME Midlet
Setup Eclipse Environment for J2ME applications