You are on page 1of 16

J2ME

Who am I?
Lim Chanmann

 Software Developer
 Email: chanmannlim@gmail.com
 Skype: lchanmann
 Twitter: lchanmann
 Blog: http://chanmannlim.wordpress.com
What is J2ME?
 Java 2 Micro Edition
 Is designed to operate in limited resource
device (eg. PDAs, mobile, pager)
Why?
 Cross-platform
 Wide-range support device
 Easy to start
Java Universe
J2ME Universe
Smaller Larger

Pager Mobile PDAs Car Navigation Internet Set-top Box


Systems appliance

Personal Profile
MIDP Personal Basic Profile
PDAP
(Mobile
(Personal Digital
Information
Assistant Profile) Foundation Profile
Device Profile)

CLDC
CDC
(Connected, Limited Device
(Connected Device Configuration)
Configuration)
J2ME
(Java 2 Micro Edition)
J2ME Basic
 Configuration: for specifies kind of device
 Specifies Java Virtual Machine
 Subset of J2SE
 Additional APIs

 Profile: more specific than configuration


 Based on configuration
 Add APIs for user interface, persistent storage ,.etc

 Optional APIs: additional functionality (Bluetooth,


Messaging, Media, 3D ,.etc)
Specification
 CLDC: mobile, pager, PDA
 160 – 512 kb memory
 Kilobyte Virtual Machine
 CLDC 1.0/CLDC 1.1

 MIDP 2.0: mobile & pager


 Min 128 kb RAM (Heap)
 8kb for persistent storage
 Input capacity, network connection
J2ME APIs in CLDC 1.1 + MIDP 2.0
MIDP 2.0
javax.microedition.lcdui
javax.microedition.lcdui.game
javax.microedition.media
javax.microedition.media.control
javax.microedition.midlet
javax.microedition.pki
javax.microedition.rms

CLDC 1.1
java.lang
java.lang.ref
java.io
java.util
java.microedition.io
Examples
Type Nokia 6600 Nokia 6630 Nokia N91
(June 2003) (June 2004) (End 2005)

Configuration CLDC 1.0 CLDC 1.1 CLDC 1.1

Profile MIDP 2.0 MIDP 2.0 MIDP 2.0

Optional APIs Nokia UI, APIs of 6600 + APIs of 6630 + Web Services,
Wireless FileConnection Security and Trust, Location,
Messaging, and PIM, Mobile SIP, Scalable 2D Vector
Mobile 3D Graphics Graphics, Advanced
Media, Multimedia Supplements, JTWI
Bluetooth

Heap size 3 MByte Unlimited Unlimited

Shared Unlimited Unlimited Unlimited


memory for
storage
MIDlet & Life clycle
 MIDP application
 Life cycle:
AMS (Application Management System)

destroyApp()
Paused

startApp() pauseApp()

destroyApp()
Active Destroyed
MIDlet Suite
 Application package
 .jar
 MIDlets + classes + Resources + Manifest information
(Version of CLDC & MIDP, name, version, vendor)

 .jad
 Same information as Manifest
 Can be used for installation
User Interface with MIDP 2.0
 Inherit from MIDlet class
 Set current displayable object to MIDlet display
 Displayable:
Displayable

Screen Canvas

Alert TextBox

List Form
Requirements
 JDK – J2SE:
http://java.sun.com/javase/downloads/index.jsp
 Wireless Toolkit:
http://java.sun.com/products/sjwtoolkit/download.h
tml
 Editor – Eclipse (Pulsar):
http://www.eclipse.org/downloads/
See in action
 Configure development environment
 Building Helloworld
 Deployment
References
 Application development with J2ME by Enrico
Rukzio
 http://www.j2mesalsa.com
 http://www.java2s.com
 http://developers.sun.com/mobility/getstart/
 http://www.java-samples.com/j2me/
 http://today.java.net/pub/a/today/2005/02/
09/j2me1.html

You might also like