0% found this document useful (0 votes)
54 views9 pages

J2ME Programming: Hiroyuki Akimoto

J2ME is the Java platform for mobile devices and consists of configurations like CLDC and profiles like MIDP. CLDC is used for mobile phones and removes features like floating point and reflection. MIDP is the main mobile phone profile and was created by Sun, while DoJa was created by NTT DoCoMo for their phones. Developing an i-appli for DoCoMo phones involves writing Java code, compiling, preverifying, creating JAR, JAM and HTML files, and testing on emulators.

Uploaded by

yberhanu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views9 pages

J2ME Programming: Hiroyuki Akimoto

J2ME is the Java platform for mobile devices and consists of configurations like CLDC and profiles like MIDP. CLDC is used for mobile phones and removes features like floating point and reflection. MIDP is the main mobile phone profile and was created by Sun, while DoJa was created by NTT DoCoMo for their phones. Developing an i-appli for DoCoMo phones involves writing Java code, compiling, preverifying, creating JAR, JAM and HTML files, and testing on emulators.

Uploaded by

yberhanu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

J2ME Programming

Hiroyuki Akimoto

Contents
„ J2ME and its Technologies
„ i-appli Programming

1
Mobile Java
„ We can run Java program in our mobile
device (such as mobile phone, PDA).

http://www.nokia.com/phones/9210/demo/intro_and_guide.html

about J2ME
„ Java2 is divided into three platforms
„ J2EE (Java2 Enterprise Edition)
„ Business applications.
„ J2SE (Java2 Standard Edition)
„ General applications (In this lecture, using this
platform).
„ J2ME (Java2 Micro Edition)
„ Small devices such as mobile phone, PDA, car
navigation.

2
about J2ME
„ J2ME Platform needs configuration and
profile.

CLDC (Connected Limited Device


Configuration)

„ Mobile Phone Java use this configuration


„ Deleted features
„ Floating Point J2SE
„ Finalize
J2ME
„ Thread Group
„ Java Native Interface (JNI) Floating
Point
„ Reflection
„ Weak References CLDC
Thread
Group

3
Profiles for mobile phone

DoJa MIDP
(Mobile Information
Device Profile)
Maker NTT DoCoMo SUN
Adopt NTT DoCoMo J-PHONE
company in au
Japan
Foreign adopt None LG Telecom, Motorola,
company Nokia, Siemens, Sam Sung,
Sendo

DoJa and MIDP


„ Differences between DoJa and MIDP
DoJa MIDP
Few Classes Many Classes
Easy to understand Difficult to understand than
DoJa
Simple User Inter Face Complex User Inter Face
structure structure
Simple data storage Storage like a simple data base
architecture
Able to ring sound Enable to ring sound
(but companies overcome this
problem to extend original API)

4
Detail of i-appli
„ DoCoMo 503, 504, 505,.. 900, FOMA
„ Limited capacity
„ 503i – 10Kbyte
„ 504i – 30Kbyte
„ 505,506 – 100K
„ 900 – 300K
„ Nonvolatile Memory Size
„ 503i – 10Kbyte
„ 504i – 100Kbyte
„ 505i – 300K
„ 900 - 500-1M
„ Applications can connect to only downloaded server

How to make i-appli


„ API
„ JavaTM 2 SDK, Standard Edition Version
1.3.0 or later
„ CLDC
„ Emulator
„ J2ME Wireless SDK for the DoJa
„ i-jade – popular emulator to run i-appli

5
How to make i-appli
„ Flow of development
Write
Compile Preverify
i-appli Program

%>javac filename %>preverify classfile

Make Write Play i-appli with


jar archive jam and html Your ke-tai!!

%>jar –cfm classfile

Form of i-appli program


„ Need to extend IApplication class.
import com.nttdocomo.ui.*;

public class ClassName extends IApplication {

// Called when this application is started


public void start(){}

// Called when this application is resumed


public void resume(){}
}

6
Hello World (Source Code)
import com.nttdocomo.ui.*;

public class HelloWorld extends IApplication{


public void start(){
HelloCanvas canvas = new HelloCanvas();
Display.setCurrent(canvas);
}
public void resume(){}

class HelloCanvas extends Canvas {


public void paint(Graphics g){
g.drawString("Hello world",0,20);
}
}
}

Hello World (Compile)


„ Compile
„ %javac –bootclasspath CLDCAPI –classpath
DoJaAPI HelloWorld.java
„ Run (in emulator: i-jade)
„ %java –jar i-jade.jar
„ Preverify
„ %preverify –classpath CLDCAPI:DoJaAPI –d .
HelloWorld
„ Make jar archive
„ %jar –cfM HelloWorld.jar HelloWorld.class
HelloCanvas.class

7
HelloWorld (Make jam file)

„ Sample jam file

AppName = My First i-appli


PackageURL = HelloWorld.jar
AppSize = 235
AppClass = HelloWorld
LastModified = Sun, 9 Jun 2002 16:45:54

HelloWorld (Make html file)


„ If you have DoCoMo’s 503i, 504i phone, or
above, you can visit this url and download
this application.

<html>

<OBJECT declare id=“iappli” data=“HelloWorld.jam” type=“application/x-jam”>


</OBJECT>
<A ijam=“#iappli” href=“index.htm”>My First i-appli</A>

</html>

8
References
„ J2ME Technologies (English)
„ http://java.sun.com/j2me/

„ Java Technologies for WIRELESS (Japanese)


„ http://jdc.sun.co.jp/wireless/

„ i-appli Specification (Japanese)


„ http://www.nttdocomo.co.jp/p_s/imode/java/index.html

„ i-jade (Japanese)
„ http://www.zentek.com/i-JADE/ja/

„ Tutorial to make i-appli (Japanese)


„ http://www.kajas.com/tutorial/index.html

„ Amateur creaters i-appli search site (Japanese)


„ http://www.kajas.com/

You might also like