You are on page 1of 2

INTRODUCTION TO J2ME & ITS INSTALLATION PROCESS

Steps to be followed to run J2me programs

1. Download and install the latest version of JRE (jre-7u17-windows-i586)


2. Download and install the latest version of JDK (jdk-7u17-windows-i586)
http://java.sun.com/javase/downloads/index.jsp
3. Go to the following link :
http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html
And then click on: Download Java ME SDK 3.3 Early Access

4. Next, select and download Java ME SDK 3.3 (46MB) from the link provided beside it.
5. Go to the following web page to download J2ME Wireless Toolkit :
http://java.sun.com/products/sjwtoolkit/download.html

6. Scroll down the page and find the following link :


Download Sun Java Wireless Toolkit 2.5.2_01 for CLDC for Windows and Linux
Then click on Download

7. Scroll down the page and find the following name:


Sun Java Wireless Toolkit 2.5.2_01
Sun Java Wireless Toolkit 2.5.2_01 for CLDC (37.36MB) Download it.

8. Install the toolkit.


9. Follow the below steps:
(a) Start -> All Programs -> Sun Java Tool Kit -> Wireless Tool Kit
(b) Click New Project Enter Project Name as FirstMidlet -> Enter Class Name
as HelloMidlet -> Click on Create Project.
(c) A setting window will open up. Accept the defaults by clicking ok in that
window.
(d) Write the source code in Notepad and save it with a name like:
HelloMidlet.java
(e) Place HelloMidlet.java in :
C:\Documents and settings\ADMIN\j2mewtk\2.5.2\apps\FirstMidlet\src\

(f) In the toolbar main window click on the Build button. When the build
compiles successfully then click on the Run button.

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloMidlet extends MIDlet {
public HelloMidlet () {
}
public void startApp () {
Form form=new Form ("First Program");
form.append ("Hello World!!!!!!!");
Display.getDisplay (this).setCurrent (form);
}
public void pauseApp () {
}
public void destroyApp (boolean unconditional) {
}
}

You might also like