J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction...

Post on 12-Jan-2016

232 views 6 download

transcript

J2ME

Presented by

May Sayed

&

Menna Hawash

Outline

• Introduction “Java Technology”• Introduction “What is J2ME?”• J2ME Architecture• J2ME Core Concepts

Configurations Profiles Optional Packages

• CLDC• MIDP and MIDlet• CDC• The Foundation Profile• Developing Tools• Demo

Introduction “Java Technology”

• J2EE – Enterprise environment

• J2SE- desktop development and low-end business

• J2ME- embedded devices and resource constrained devices

Introduction

• What is J2ME ?– Java Platform, Micro Edition is a runtime and

collection of Java APIs for the development of software for resource constrained devices such as PDAs, cell phones and other consumer appliances.

J2MEServer and Enterprise Computers

Servers and Personal Computers

Embedded devices

Mobile Phones Smart

Cards

J2ME Architecture

Core Concepts: Configurations• A Configuration is a complete Java

runtime environment consisting of :1. Java Virtual Machine to execute Java byte code

2. Native Code to interface to the underlying system

3. A set of core Java runtime classes

• There are currently two J2ME Configuration:

• Connected Limited Device Configurations (CLDC)

• Connected Device Configurations (CDC)

Core Concepts: Profiles

• A Profile is combined with a Configuration to provide a complete runtime environment for a specific device category.

• Adds domain-specific classes to Configurations.

• Define user interface classes.

Core Concepts: Profiles

• The first Profile released was Mobile Information Device Profile (MIDP).

• Another CLDC Profile extending MIDP is Personal Digital Assistant Profile (PDAP), which offers additional classes and features for more powerful handheld devices.

Core Concepts: Profiles (Cont.)

• For CDC based Profiles, Foundation Profile (FP) extends CDC with additional J2SE classes.– The Personal Basis Profile extends FP.

Core Concepts: Optional Packages

• It is a set of APIs in support of additional, common behaviors that don’t belong in one specific Configuration or Profile.

• For example:» The RMI Optional Package.» Java APIs for Bluetooth.» And many others.

CLDC

• Connected, Limited Device Configuration

• Serves devices with 512 KB or less memory, limited power supply, limited internet connectivity and simple user interface

• Such devices as cell phones, pagers and PDAs.

CLDC Packages

• java.io• System input and output

• java.lang• Classes fundamental to the Java programming

language

• java.util• Collections, date and time support, miscellaneous

utility classes

• javax.microedition• Generic connections

MIDP and MIDlet

• MIDP is a set of J2ME APIs that define how software applications interface with cellular phones and two-way pagers. It adds to the functionally of CLDC.

• Using these APIs, a developer creates a program called a MIDlet, that can be deployed on any of the supported devices (PDAs, cell phone…etc)

MIDlet Life Cycle

CDC

• Connected Device Configuration.

• Devices that have 2MB or more memory and can support a complete implementation of the standard Java virtual machine.

• Best for creating application for TV set top boxes, entertainment systems, embedded devices and other devices of such scale.

The Foundation Profile

• Defined for CDC

• Extends all APIs provided by CDC, but doesn’t provide user interface ones.

• Must be augmented with another profiles that provide user interface such as:– Personal Basis Profile– Personal Profile

J2ME

CDC

CLDC

Relation of J2ME to J2SE

J2SE

CDC CLDC

Developing Tools

• Developing tools:http://www.netbeans.info/downloads/download.php

Download :

NetBeans IDE 5.0 Installer

NetBeans Mobility Pack 5.0 Installer

Demo

References

• J2ME grows up, IBMhttp://www-128.ibm.com/developerworks/java/library/j-j2me/• Java 2 Platform, Micro Edition (J2ME) ,Sun

Microsystemshttp://java.sun.com/j2me/• Java 2 Platform, Micro Edition (J2ME) ; JSR 86

Overviewhttp://java.sun.com/j2me/overview.html

References

• Java Platform, Micro Edition, Wikipediahttp://en.wikipedia.org/wiki/J2ME• White Paper J2ME Programming in a

mobile worldhttp://www.openpsa.net/archive/wisdom_white_paper_j2me.pdf• J2ME Core Conceptshttp://www.developer.com/java/j2me/article.php/1378971

Any Questions?