1 / 16

The Java Platform Micro Edition Java ME

The Java Platform Micro Edition Java ME. Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador. Outline. The Java platform The Java ME platform The Connected Limited Device Configuration (CLDC) 1.1

sai
Download Presentation

The Java Platform Micro Edition Java ME

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Java Platform Micro EditionJava ME Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador

  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. The Java Platform Servers • Java Enterprise Edition • (Java EE) TV set up boxes, cellular phones, smart phones, PDAs PCs, laptops • Java Standard Edition • (Java SE) • Java Micro Edition • (Java ME) • Java Virtual Machine • Operating System

  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. The Java ME Platform • Optional Packages • Optional Packages • Personal Profile • Mobile Information Device Profile • (MIDP) • Foundation Profile • Connected Limited Device Configuration • (CLDC) • Connected Device Configuration • (CDC) • Java Virtual Machine • Operating System

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

  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 • 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(http://www.csee.usf.edu); • Connector.open(“socket://192.168.0.2:2800”); • Connector.open(“comm:0;baudrate=4800”); • Connector.open(“datagram://192.168.0.2: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

More Related