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. Thanks for all your past and future contributions.

Become an Series 40 application developer - Part 1

From Wiki
Jump to: navigation, search
Article Metadata
Created: adarsha_saraff (26 Jul 2012)
Last edited: hamishwillee (01 Aug 2013)

This article explains how to develop a Java ME ("native") application for Series 40 devices. The article is for absolute beginners, and also for developers who are familiar with Java ME, but want to work on Series 40.



Java is the native application development platform for Series 40 devices. Nokia Asha Web Apps provide an alternative environment, primarily for developing apps to access existing Internet services. Flash Lite apps can be created in Series 40 devices released before May 2012.

Developing applications for these devices is interesting. Series 40 phones are like budget phones cost less and more efficient considered to any other manufacturer's low-end devices. Most of the users of phones are students, teachers, farmers, senior citizen and taxi drivers and all.

When it comes to development, Series 40 devices have different screen resolutions, different memory size, different CPU clock rates and different hardware type. There are Classic phones, Touch and Type phones, Qwerty Phones and Full Touch phones. When it comes to screen resolution; it ranges from small screen (128x160 pixels) to medium (240x320 pixels, 320x240 pixels) and to large (240x400 pixels) resolutions.

We need to consider memory at most. For some of device max. jar size allowed is 2MB and maximum heap memory available is 4MB. High-end Series 40 devices can have the features of smart phones - for example Asha 303 and Asha 311 have got a 1GHz CPU.

Series 40 Devices

Beginning With Development

Throughout the development process, we will use two IDE's and three SDK's. We will use NetBeans IDE with Sun Java Micro-edition SDK to develop application for classic phones, NetBeans IDE with Nokia Java SDK 1.1 for Touch and Type devices and Nokia IDE for full touch devices.

In this "Become an Series 40 application developer - Part 1", I will cover the things about - Getting Started, Creating and running a project in both NetBeans and Nokia IDE.

Getting Started with NetBeans IDE

Download the latest NetBeans IDE with JavaME technology included and follow the procedure to install and configure the IDE.

NetBeans IDE after launch

Creating and running a first project

  • Create a New Project by pressing '"Ctrl+Shift+N'" keyboard shortcut or File>New Project'. Now in the New Project window select "JavaME" and "Mobile Application" and hit '"Next"' button.
  • Now in New Mobile Application window, enter the Project Name as s40_firstapp and make sure that "Set as Main Project" and "Create Hello MIDlet" is checked and click "'Next'" button.
    Netbean first project step1.png
  • Now Make sure that Emulator Platform" is set to "CLDC Oracle Java(TM) Platform Micro Edition SDK" and Device to "DefaultCldcPhone1" and Device Configuration to "CLDC-1.1" and Device Profile to "MIDP-2.0" and click Finish button.
    Netbean first project step2.png

The picture below shows the components of NetBeans IDE, with which you are going to work:

Netbean first project step3.png

1- Source - Here your are going to code all program statement.
2- Screen - Visual editor to work with form components.
3- Flow - Shows flow diagram of command and actions.
4- Displays - Drag and Drop option to create all display components like Form, Alert, List etc.
5- Commands - Drag and Drop option to create commands.
6- Elements - Drag and Drop option for components to add to list, choice group and all.
7- Properties - Shows properties of the selected component. We use this to change name, type and all.
8- Clean and Build - Clears all previously build jar files and builds again.
9- Run - Runs the jar file on emulator.
10 - Work-space - Work-space to work with.

  • Now your first project is ready to run. Run project by clicking Run button.
Running a project

Wow, you just created your project by coding nothing.

You might be amazing how is this possible to get output without writing any code. That's because NeatBean had generated code on your behalf. Now explore the code, by clicking on Source button.

Getting Started with Nokia IDE

Download the Nokia SDK 2.0 for Java Developers. Follow the instructions to install and configure the SDK.

Nokia IDE Welcome/Start page

Creating and running a first project

  • Create a New Project by pressing "Alt+Shift+N" keyboard shortcut or File>New>MIDlet Project
  • Now in "New MIDlet Project" window, enter the Project Name as "frists40app" and click "Next" button.
    Nokiaide first project step1.png
  • Enter MIDlet Name as "firsts40app" and "Your Name" in MIDlet Vendor and select Microedition Configuration" as "Connected Limited Device Configuration(1.1)" and Microedition Profile as "Mobile Information Device Profile(2.1)" and click "Finish" button to create.
    Nokiaide first project step2.png
  • Create a MIDlet, by right clicking on "src" folder, select "new" from the pop-up menu and select "JavaME MIDlet".
    Nokiaide first project step3.png
  • Enter the Name as "Hello" in New Java MIDlet window and click "Finish" button.
    Nokiaide first project step4.png
  • Type the following statements inside the class.
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Form;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    public class Hello extends MIDlet {
    Form main;
    public Hello() {
    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
    protected void pauseApp() {
    protected void startApp() throws MIDletStateChangeException {
    main = new Form("Welcome");
    main.append("Hello World!");
  • Now, Its time for testing our first project. Right click on project folder. Select "Run As" from the pop-up menu and "Emulated JavaME MIDlet".
    Nokiaide first project step5.png

  • Repeat the previous step, if you didn't get application running on Emulator.
    Nokiaide first project step6.png

Congratulations, you just created your first application in Nokia IDE for Series 40 full touch device. Try to run the application by changing the string in new Form("Welcome") and main.append("Helo World!").


  • "Java" is the native platform for developing application for Series 40.
  • You can develop applications for taxi drivers, teachers, farmers and for every one.
  • There are different screen resolution, memory size, hardware support and CPU clock rate to be considered while developing Series 40 applications.
  • Netbeans IDE and Nokia IDE are used to develop applications for Series 40 device.

Where to go Next

Explore Series 40 device specifications.

Try testing your first application on different Series 40 devices using RDA. Check out the "How it looks on different Series 40 device with different screen resolution?"

Become an Series 40 application developer - Part 2.

This page was last modified on 1 August 2013, at 06:38.
340 page views in the last 30 days.