As a seasoned Java Developer, I've done my own fair share of Java development over the years from Applets in the early days to current Web Services and SOAs

In this article, I will take you through a facsinating world of Mobile Development with Java Technology. These are articles written by me, so you could use them as you see fit, but please I would like you to read the copyright terms. The code posted here can not be used in a mission-critical environment

That out of the way, lets rock on with the main business!

Newcomers to J2ME should start by looking at the Introduction and Installation of the software tools that we will be using throughout our articles on J2ME Mobile development. The introduction page will give you a firm understanding of what J2ME is and what it isn't. If you also want to know how to configure your web server to allow you to serve your J2ME applications from your server, have a look here. Please note that the configuration described here is for web servers running Apache 2, and if anyone knows how to do it on Windows platform, please email me. Once you have the basics of what J2ME is, the next step will be to role your sleeves up and start designing, coding and experimenting with small projects.

So, to follow this section properly, I would expect that you have gone through the introduction section as suggested above and you have all the tools ready to start coding. Here are the steps we will go through here:

The final stage is distributing it so that friends and colleagues can download them to their devices over the air (OTA).

package com.onyxtic;

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class HelloWorld extends MIDlet implements CommandListener
{
    private Form form;

    public HelloWorld (){
        form = new Form ("HelloWorld");
        form.append (new StringItem (null, "Hello world from Onyxtic!"));
        form.addCommand (new Command ("Exit", Command.EXIT, 0));
        form.setCommandListener (this);
    }

    public void startApp (){
        Display.getDisplay (this).setCurrent (form);
    }

    public void pauseApp (){
    }

    public void destroyApp (boolean unconditional){
    }
    
    public void commandAction (Command c, Displayable s){
        notifyDestroyed ();
    }
}




Find out more about Me.