Presentation is loading. Please wait.

Presentation is loading. Please wait.

Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples.

Similar presentations


Presentation on theme: "Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples."— Presentation transcript:

1 Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples

2 2 Java 2 Micro Edition -- CLDC l A version of the Java platform which supports small devices -- hand-helds, cell phones, pagers, embedded systems,... l The Connected Limited Device Configuration (CLDC) n a set of APIs for applications for devices with limited screens size, memory, power, bandwidth. Contains u the kilobyte virtual machine (KVM)  packages java.io, java.lang, java.util t small subsets of the corresponding J2SE packages See java.sun.com/j2me/docs/pdf/cldcapi.pdf for details n Package java.io contains u interfaces DataInput, DataOutput u classes InputStream, OutputStream DataInputStream, DataOutputStream ByteArrayInputStream, ByteArrayOutputStream InputStreamReader, OutputStreamReader PrintStream ReaderWriter u exception, error classes etc

3 3 J2ME -- CLDC l The Connected Limited Device Configuration (CLDC) n Package java.lang contains u interface Runnable u classes BooleanByteCharacterClass Integer LongMathObject RuntimeShortStringStringBuffer SystemThreadThrowable n Package java.util contains u interface Enumeration u classes CalendarDataHashtable Random Stack Timer TimerTaskTimeZoneVector n CLDC version 1.0 contained u no floating point types, no serializable objects u no thread groups no JNI n CLDC 1.1 which appeared in March 2004 contains more features, including floating point arithmetic support

4 4 J2ME -- MIDP l The Mobile Information Device Profile n APIs for programming mobile devices -- phones, Palm Pilots,... n Application software in MIDlets n Package javax.microedition.lcdui contains GUI classes for devices with LCD screens u interfaces Choice CommandListenerItemListener u classesAlertAlertTypeCanvasChoiceGroup CommandDataFieldDisplay Displayable FontFormGaugeGraphics ImageImageItemItemList ScreenScreenItemTextBoxTextField Ticker

5 5 J2ME -- MIDP l The Mobile Information Device Profile (ctd) n Package javax.microedition.io contains support for networking - u interfaces Connection ContentConnection DatagramDatagramConnection HttpConnectionInputConnection OutputConnectionStreamConnection StreamConnectionNotifier u classConnector

6 6 J2ME -- MIDP l The Mobile Information Device Profile n Package javax.microedition.rms contains support for local storage - u interfaces RecordComparitorRecordEnumeration RecordFilterRecordListener u classRecordStore n Package javax.microedition.midlet contains the MIDlet class n The minimum hardware for a MIDlet: u at least 96 X 54 pixels monochrome display u a two-way wireless network u an input device u 128 kb for CLDC & MIDP classes u at least 32 kb for the KVM

7 7 Graphics in a MIDlet > javax.microediiton.lcdui.Displayable > Screen > Canvas AlertTextBoxList Form (low-level) (high-level) l Canvas is “low leve1” n not a container, but we can override its paint method to use Graphics draw methods l Screen is “high level” n a container of laid-out components

8 8 Practicalities l Download the J2ME Wireless Toolkit from http://java.sun.com/products/j2mewtoolkit/index.html http://java.sun.com/products/j2mewtoolkit/index.html n Install in Windows or Linux n Documentation accompanies the software l Look at the tutorial material in http://developers.sun.com/techtopics/mobility/learn/ http://developers.sun.com/techtopics/mobility/learn/ n Especially MIDlet Life Cycle and Getting Started with MIDP. l Exercises n 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


Download ppt "Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples."

Similar presentations


Ads by Google