01 java 2 micro edition

26
Java 2 Micro Edition Introduction Cornelius Koo - 2005

description

J2ME Intro

Transcript of 01 java 2 micro edition

Page 1: 01 java 2 micro edition

Java 2 Micro Edition

Introduction

Cornelius Koo - 2005

Page 2: 01 java 2 micro edition

What is J2ME

• J2ME is a development and runtime

environment designed to put Java

software on consumer electronics and

embedded devices.

Page 3: 01 java 2 micro edition

What is Mobile Devices

• Those computing devices that easily

carried and used while in transport.

Page 4: 01 java 2 micro edition

What is Wireless Device

• Device capable of communicating or

networking without wire or cable.

Page 5: 01 java 2 micro edition

Micro Devices

Page 6: 01 java 2 micro edition

History

• Before Java was called Java, it was Oak–

a programming language designed for TV

set-top boxes and other devices.

• J2ME come at last (1999), after J2SE and

J2EE, targeting “information appliances”

ranging from Internet enabled TV set-top

boxes to cellular phones.

Page 7: 01 java 2 micro edition

Advantages of Java Technology

• Cross platform: This is very important in

the diversified mobile device market. In a

heterogeneous enterprise environment,

the ability to develop and maintain a single

client for all devices results in huge

savings.

Page 8: 01 java 2 micro edition

Advantages of Java Technology

• Robust: Since Java applications are

completely managed, the bytecode is

verified before execution, and memory

leaks are reclaimed by garbage collectors.

Even if a Java application does crash, it is

contained within the virtual machine. It will

not affect other sensitive applications or

data on the device.

Page 9: 01 java 2 micro edition

Advantages of Java Technology

• Secure: The Java runtime provides

advanced security features through a

domain-based security manager and

standard security APIs.

Page 10: 01 java 2 micro edition

Advantages of Java Technology

• Object oriented: The Java language is a

well-designed, object-oriented language

with vast library support. There is a vast

pool of existing Java developers.

Page 11: 01 java 2 micro edition

Advantages of Java Technology

• Wide adoption at the back end: It is

relatively easy to make Java clients work

with Java application servers and

messaging servers. Due to the wide

adoption of Java 2 Enterprise Edition

(J2EE) on the server side, mobile Java is

the leading candidate for enterprise

frontend applications.

Page 12: 01 java 2 micro edition

Java Family

• Standard Edition (J2SE)

Designed to run on desktop and workstation

computers

• Enterprise Edition (J2EE)

With built-in support for Servlets, JSP, and XML,

this edition is aimed at server-based applications

• Micro Edition (J2ME)

Designed for devices with limited memory

display and processing power

Page 13: 01 java 2 micro edition

Java Family

Page 14: 01 java 2 micro edition

J2ME Platform

Page 15: 01 java 2 micro edition

Configuration

• Configuration defines a Java Platform for a

broad range of devices.

• Configuration defines the Java language

features and the core Java libraries of the

JVM for that particular Configuration

Page 16: 01 java 2 micro edition

Connected Device Configuration

(CDC)

• 512 kb (minimum) memory for running

Java

• 256 kb for runtime memory allocation

• Network connectivity, possibly persistent

and high bandwidth

Page 17: 01 java 2 micro edition

Connected, Limited Device

Configuration (CLDC)

• 128 kb memory for running Java

• 32 kb memory for runtime memory

allocation

• Restricted user interface

• Low power, typically battery powered

• Network connectivity, typically wireless,

with low bandwith and intermittent access

Page 18: 01 java 2 micro edition

Profile

• Profile is an extension to Configuration.

• It provides the libraries for a developer to

write applications for a particular type of

device.

Page 19: 01 java 2 micro edition

Profiles

Page 20: 01 java 2 micro edition

Profiles Hierarchy

Page 21: 01 java 2 micro edition

MIDP

• Mobile Information Device Profile defines

APIs for user interface components, input

and event handling, persistent storage,

networking and timers,taking into

consideration the screen and memory

limitations of mobile devices.

Page 22: 01 java 2 micro edition

Compact Virtual Machine (CVM)

• Has approximately the same spec as

J2SE.

• Supports for Java 2 v1.3 VM features and

libraries : Security, Weak References,

Java Native Interface, Remote Method

Invocation, Java VM Debugging Interface.

Page 23: 01 java 2 micro edition

Kilobyte Virtual Machine (KVM)

• Requires only 40 and 80 kb of memory

• Only 20-40 kb of dynamic memory (heap)

required

• Can run on 16-bit processors clocked at

only 25 MHz

Page 24: 01 java 2 micro edition

MIDP Architecture

Page 25: 01 java 2 micro edition

J2ME Executive Committee

Page 26: 01 java 2 micro edition

Reference

• Core J2ME Technology and MIDP. John

W. Muchow. Prentice Hall PTR, 2002.

• Enterprise J2ME: Developing Mobile

Java Applications. Michael Juntao Yuan.

Prentice Hall PTR, 2003.

• J2ME in A Nutshell. Kim Topley. Oreilly,

2002.