Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Developing MIDlets using Pulsar and Eclipse

From Wiki
Jump to: navigation, search

This article is an introduction to developing Java ME applications using the Pulsar package, which includes Eclipse and Mobile Tools for Java (MTJ).

Article Metadata
Article
Created: bogdan.galiceanu (03 Jul 2009)
Last edited: hamishwillee (01 Aug 2013)

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):

1
2
3
4
5

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:

This page was last modified on 1 August 2013, at 05:22.
354 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×