Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Java Platform Micro Edition Java ME

Similar presentations


Presentation on theme: "The Java Platform Micro Edition Java ME"— Presentation transcript:

1 The Java Platform Micro Edition Java ME
Dr. Miguel A. Labrador Department of Computer Science & Engineering

2 Outline The Java platform The Java ME platform
The Connected Limited Device Configuration (CLDC) 1.1 The Mobile Information Device Profile (MIDP) 2.0 Optional packages

3 Operating System Java Virtual Machine
The Java Platform Operating System Java Virtual Machine Java Enterprise Edition (Java EE) Java Standard Edition (Java SE) Java Micro Edition (Java ME) TV set up boxes, cellular phones, smart phones, PDAs PCs, laptops Servers

4 The Java Platform Source: Sun Microsystems white paper “Java 2 ME Building Blocks for Mobile Devices”

5 The Java Platform Micro Edition (Java ME)
Java platform for mobile devices and embedded systems Resource-constrained in terms of CPU, memory, energy Smallest footprint and smallest VM Differentiates between different types of resource-constrained devices Some with more resources, such as set up boxes, automobile navigation systems More constrained devices, such as cellular phones, PDAs, pagers Architecture has four layers JVM that sits on top of the operating system The configuration layer The profile layer Optional packages layer

6 Operating System Java Virtual Machine
The Java ME Platform Operating System Java Virtual Machine Optional Packages Connected Limited Device Configuration (CLDC) Connected Device Configuration (CDC) Mobile Information Device Profile (MIDP) Foundation Profile Personal Profile

7 More resource-constrained devices
The Java ME Platform More resource-constrained devices Operating System Java Virtual Machine Optional Packages Connected Limited Device Configuration (CLDC) Connected Device Configuration (CDC) Mobile Information Device Profile (MIDP) Foundation Profile Personal Profile

8 The CLDC 1.1 Targets devices with 192KB of memory, 16-bit or 32-bit processors, low power consumption, intermittent connectivity and limited bandwidth Cell phones, pagers, PDAs, and the like Contains core Java libraries (java.lang.*; java.utili.*) and APIs for input/output, security, and networking Java programming language and VM features Libraries and APIs

9 Java Programming Language and VM features
Floating point support Float and Double Calendar, Date, Timezone, and Thread objects redesigned to be more Java SE-compliant JVM the same as the one used in Java SE, except: No finalization of class instances Method Object.finalize() not included Exemption and error handling limitations User-defined class loaders are not supported Thread groups not supported; only individual threads Class file verification not supported Only offline preverification with stack maps

10 The Preverification Process
Source: Sun Microsystems white paper “Java 2 ME Building Blocks for Mobile Devices”

11 Libraries and APIs For upward compatibility, CLDC 1.1 includes libraries that are a subset of the standard libraries included in Java SE and EE platforms System classes essential to the Java programming language Java.lang package: java.lang.Object, *.Class, *.Runtime, *.System, *.Thread, *.Runnable, *.String, *.StringBuffer, *.Throwable Data type classes Java.lang.Boolean, *.Byte, *.Short, *.Integer, *.Long, *.Float, *.Double, *.Character Collection classes Java.util.Vector, *.Stack, *.Hastable, *.Enumeration, *.Random, *.Math Input/Output classes Java.io.InputStream, *.OutputStream, *.ByteArrayInputStream, *.ByteArrayOutputStream, *.DataInput, *.DataOutput, *.DataInputStream, *.DataOutputStream, *.Reader, *.Writer, etc.

12 Libraries and APIs CLDC also includes some specific classes
Calendar and Time classes Java.util.Calendar, *.Date, *.TimeZone Exception and Error classes Java.util.Exception, *.AruthmeticException, *.ArrayStoreException, *.NullPointerException, *.NumberFormatException, *.RuntimeException, *.SecurityException, others. Java.lang.Error, *.NoClassDefFoundError, *.OutOfMemoryError, *.VirtualMachineError CLDC also includes some specific classes Described within the Generic Connection Framework (GCF) Provide minimum input/output and networking support needed by all devices while opening the door for extending these capabilities and implementing new ones as needed by specific devices Reduces footprint

13 Libraries and APIs GCF included in the javax.microedition.io package and implements six basic Connection APIs InputConnection openInputStream and openDataInputStream methods OutputConnection openOutputStream and openDataOutputStream methods StreamConnection Combines InputConnection and OutputConnection interfaces Two way communication ContentConnection Sub-interface of the StreamConnection interface that provides basic information contained in HTTP connections StreamConnectionNotifier acceptAndOpen method to block client program and wait for connection

14 Libraries and APIs DatagramConnection Implements several methods to handle input/output of datagrams Receive(), send(), getMaximunLength() The GCF includes a general abstraction to handle all forms of communications Connector.open (“<protocol>:<address>;<parameters>”); Connector.open( Connector.open(“socket:// :2800”); Connector.open(“comm:0;baudrate=4800”); Connector.open(“datagram:// :2800”);

15 The MIDP 2.0 If the CLDC is a contract between the device and the Java programming language, the MIDP is a contract between the Java programming language and the application developer MIDP is the profile defined for CLDC devices Minimum set of APIs required to develop graphical and networked applications for resource-constrained mobile devices or MIDlets User Interface APIs, Game APIs, Networking APIs, Security APIs, Sound APIs, Storage APIs MIDlets and MIDlets development will be covered right after this topic

16 Optional Packages The Java ME platform is very rich in additional packages Mobile Media API (JSR 135) Access and control multimedia resources and files. The Sound API included in MIDP is a subset of this API Security and Trust Services API (JSR 177) Session Initiation Protocol API (JSR 180) Mobile 3D Graphics API (JSR 184) Event Tracking API (JSR 190) Wireless Messaging API (JSR 120) Location API (JSR 293) Java ME Web Services API (JSR 172) Many others


Download ppt "The Java Platform Micro Edition Java ME"

Similar presentations


Ads by Google