0% found this document useful (0 votes)
34 views8 pages

J2ME - Introduction: Advanced Applications Development in Java

J2ME is a version of Java for small devices like phones and PDAs. It includes the Connected Limited Device Configuration (CLDC) which provides core Java APIs for limited devices, and the Mobile Information Device Profile (MIDP) which provides GUI, networking and data storage APIs for mobile applications called MIDlets. MIDP uses the javax.microedition packages for its GUI classes like Screen and Canvas, networking classes, and data storage classes. The minimum requirements for a device to run MIDlets are a 96x54 pixel display, wireless network connectivity, input device, and at least 128KB of memory.

Uploaded by

Imran
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 PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

J2ME - Introduction: Advanced Applications Development in Java

J2ME is a version of Java for small devices like phones and PDAs. It includes the Connected Limited Device Configuration (CLDC) which provides core Java APIs for limited devices, and the Mobile Information Device Profile (MIDP) which provides GUI, networking and data storage APIs for mobile applications called MIDlets. MIDP uses the javax.microedition packages for its GUI classes like Screen and Canvas, networking classes, and data storage classes. The minimum requirements for a device to run MIDlets are a 96x54 pixel display, wireless network connectivity, input device, and at least 128KB of memory.

Uploaded by

Imran
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 PPT, PDF, TXT or read online on Scribd
You are on page 1/ 8

Advanced Applications Development in Java

J2ME -- Introduction

Introduction / Overview Java 2 Micro Edition

CLDC MIDP

Examples

Michael Brockway

Java 2 Micro Edition -- CLDC


A version of the Java platform which supports small devices -- hand-helds, cell phones, pagers, embedded systems, ... The Connected Limited Device Configuration (CLDC)

a set of APIs for applications for devices with limited screens size, memory, power, bandwidth. Contains

the kilobyte virtual machine (KVM) packages java.io, java.lang, java.util small subsets of the corresponding J2SE packages

See java.sun.com/j2me/docs/pdf/cldcapi.pdf for details Package java.io contains


interfaces DataInput, DataOutput classes InputStream, DataInputStream, ByteArrayInputStream, InputStreamReader, PrintStream Reader exception, error classes etc

OutputStream DataOutputStream ByteArrayOutputStream OutputStreamReader Writer

J2ME -- CLDC

The Connected Limited Device Configuration (CLDC)

Package java.lang contains


interface Runnable classes Boolean Integer Runtime System interface Enumeration classes Calendar Random TimerTask

Byte Long Short Thread

Character Math String Throwable

Class Object StringBuffer

Package java.util contains


Data Stack TimeZone

Hashtable Timer Vector

CLDC version 1.0 contained no floating point types, no serializable objects no thread groups no JNI CLDC 1.1 which appeared in March 2004 contains more features,

including floating point arithmetic support


3

J2ME -- MIDP

The Mobile Information Device Profile


APIs for programming mobile devices -- phones, Palm Pilots, ... Application software in MIDlets Package javax.microedition.lcdui contains GUI classes for devices with LCD screens

interfaces classes

Choice Alert Command Font Image Screen Ticker

CommandListener AlertType DataField Form ImageItem ScreenItem Canvas Display Gauge Item TextBox

ItemListener ChoiceGroup Displayable Graphics List TextField

J2ME -- MIDP

The Mobile Information Device Profile (ctd)

Package javax.microedition.io contains support for networking

interfaces

Connection Datagram HttpConnection OutputConnection StreamConnectionNotifier Connector

ContentConnection DatagramConnection InputConnection StreamConnection

class

J2ME -- MIDP

The Mobile Information Device Profile

Package javax.microedition.rms contains support for local storage

interfaces

class

RecordComparitor RecordFilter RecordStore

RecordEnumeration RecordListener

Package javax.microedition.midlet contains the MIDlet class The minimum hardware for a MIDlet:

at least 96 X 54 pixels monochrome display a two-way wireless network an input device 128 kb for CLDC & MIDP classes at least 32 kb for the KVM

Graphics in a MIDlet

<<interface>>javax.microediiton.lcdui.Displayable

<<abstract>>

<<abstract>>

Screen

(high-level)

Canvas

(low-level) Alert

TextBox

List

Form

Canvas is low leve1

not a container, but we can override its paint method to use Graphics draw methods
a container of laid-out components
7

Screen is high level

Practicalities

Download the J2ME Wireless Toolkit from http://java.sun.com/products/j2mewtoolkit/index.html


Install in Windows or Linux Documentation accompanies the software

Look at the tutorial material in http://developers.sun.com/techtopics/mobility/learn/

Especially MIDlet Life Cycle and Getting Started with MIDP.

Exercises

Make a MIDlet which will display a multiplication table when an integer between 1 and 12 is input. Make a MIDlet which will do simple (+, -, X, /) calculations on two input numbers

You might also like