j2me tutorial

Starting with J2ME

OK, so I decided to try to write a Java application for a mobile cellphone.
I found out that it is suprizingly easy to write a Java application for your mobile cellphone!
The tools available are fantastic!

First thing, you should know some Java or Java-like language.
Because, the Java applications for your phone are written in normal Java!
The compiler just compiles it to run on your phone. Very nice and easy.

J2ME == the platform that most mobile phones run Applications / Games with.

THE dev tool

NetBeans
If you program/code in Java, NetBeans will definitely help your productivity, especially if you are creating swing/swt (GUI) applications for the normal Java VM.

NetBeans IDE runs on the J2SE JDK 5.0 (JavaTM 2 JDK, Standard Edition), which consists of the Java Runtime Environment plus developer tools for compiling, debugging, and running applications written in the JavaTM language. NetBeans IDE 5.0 also runs on J2SE SDK version 1.4.2, but it has only been tested on JDK 5.0.
You can download the JDK for your platform from the site listed below:
* http://java.sun.com/j2se/1.5.0/download.html

For creating J2ME applications get NetBeans, then get the NetBeans Mobility Pack. NetBeans Mobility
What is easier than this -> netbeans mobility pack IDE

The NetBeans Mobility Pack adds to the NetBeans IDE everything needed to immediately start writing, testing and debugging Java applications for mobile phones and other Java Micro Edition (Java ME) technology-enabled devices. It includes the Java ME wireless toolkit and device emulators, so that no additional downloads are needed to start working with mobile technologies. The NetBeans Mobility Pack provides comprehensive support for the Mobile Information Device Profile (MIDP) 1.0 and 2.0, the Connected, Limited Device Configuration (CLDC) 1.1, and includes visual design tools for mobile applications, integrating mobile applications with web services. It completely solves the problem of creating device-specific code for cases such as specific phone models, phones with only monochrome displays or varying screen sizes, and all other device-specific issues.

You can code, then test it in the included emulator immediately.

Free CD
NEW: netbeans.org are giving away (posting) CD’s to anyone that wants one. Part of their “empowering developers worldwide” tour thingy.
* NetBeans free CD
Contains NetBeans IDE 5.5, Mobility Pack, Profiler, Sun Java System Application Server 9, Netbeans Documentation.
NetBeans World Tour CD is absolutelly free!!! No shipping or CD charges!

According to the site, my CD was sent on the 18 April, and I received it on the 19 April! Aeroplanes are fast. Posted from Czech Republic to South Africa.
Thanks SUN!

Tutorial

If you are starting off, the NetBeans.org site is a good place to start: they have j2me NetBeans tutorials and guides.

I found a cool resource on sun.com – java learning JavaOneOnline, it contains nice live flash presentations with audio about most things Java Mobile Edition.
A J2ME introduction with explanations of terms for the ‘newbies’ is here. You need to register on the developer.sun.com site to get a login.

Summary

0) Get the latest release of Java SDK. (http://java.sun.com/j2se/1.5.0/download.html)
1) Get latest NetBeans.
OR
0+1) Get the JDK 5 with Netbeans 5 Bundle

2) Get the latest NetBeans Mobility Pack

Emulator for testing included.

J2ME sites

Advanced Topics

There are memory restrictions when it comes to programming an application for a mobile cellphone.

Here are some resources: