Developing MIDlets using Pulsar and Eclipse
Article Metadata
Compatibility
Article
This article is an introduction to developing Java ME applications using the Pulsar package, which includes Eclipse and Mobile Tools for Java (MTJ).
For instructions on how to develop MIDlets using EclipseME, please refer to the article Creating your first MIDlet using EclipseME.
Contents |
Downloading and installing the necessary tools
As with any version of Eclipse, a Java Runtime Environment must be present on the system in order for it to work. It can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html and the Eclipse website has details about the recommended versions.
Pulsar for Mobile Java Developers must be downloaded from http://eclipse.org/downloads/.
An SDK is also needed. We will use the S60 3rd Edition, Feature Pack 2 v1.1 SDK provided by Nokia Developer. Instructions on how to install it are available in its ZIP package.
Developing the MIDlet
Creating a project
Launch Eclipse. To create a MIDlet, we must first create a project. Go to File -> New -> MIDlet Project. Give your project a name and click the Add... button to add a configuration. In the window that appears, click the Manage Devices... button and, in the next window, the Import... button. Then, in the next window, click the Browse... button and navigate to the SDK's installation directory (by default C:\S60\devices\S60_3rd_FP2_SDK_v1.1). When done, click Finish. In the window called "Add Configuration", select "S60Emulator" in the Device field. Click Finish until the project creation wizard is closed, and, if asked, confirm switching to the Java ME perspective.
The following images, in order, illustrate the process described above (click to enlarge):
Creating a MIDlet
Go to File -> New -> Java ME MIDlet. Give it a name and click Next>. Here we are presented with the option to create a MIDlet using predefined templates. We will use the "Hello World MIDlet using eSWT" template. After clicking the Finish button, the code contained in the MIDlet file will be displayed.
Testing the MIDlet
Go to Run -> Run As -> Emulated Java ME MIDlet (or press Ctrl+F11) in order to launch the emulator and see the application in action.
You can find the JAR and JAD to deploy to your device in \workspace\<project name>\.mtj.tmp\emulation.
Additional information
The following material may prove to be useful:
- Presentations on the Eclipse website, including future plans and tutorials


(no comments yet)