developing an application with j2me technology scott palmer, nat panchee, judy sullivan, karen...

23
Developing an Developing an Application with Application with J2ME Technology J2ME Technology Scott Palmer, Nat Panchee, Judy Sullivan, Karen Thabet, Sten Westgard

Post on 19-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Developing an Developing an Application with J2ME Application with J2ME

TechnologyTechnology

Scott Palmer, Nat Panchee, Judy Sullivan,

Karen Thabet, Sten Westgard

Java -Java -“One size does not fit all”“One size does not fit all”

Java Technology - EditionsJava Technology - Editions

Memory footprint decreases

J2ME - CharacteristicsJ2ME - Characteristics

J2ME maintains qualities of Java Technology

Consistency across products

Portability of code

J2ME - CharacteristicsJ2ME - Characteristics

Run anywhere, anytime and on any device

Safe network delivery

Upward scalability with J2SE and J2EE technology

OOP base language

What is a Configuration?What is a Configuration?

Specifies Java Programming language features supported

Specifies the JVM features supported

Specifies the basic Java libraries and APIs supported

J2ME ConfigurationsJ2ME Configurations

Connected Device Configuration (CDC)Connected Limited Device Configuration

(CLDC)Purpose:

– CDC – High end consumer devices– CDLC – Low end consumer devices

Java2 Micro Edition - Java2 Micro Edition - ArchitectureArchitecture

CDCCDC

32 bit processor >.5MB (ROM+RAM) JVM support High bandwidth network connectivity Devices include:

– Communicators– Next Generation Smart Phones– Home Appliances– Car Navigation Systems

CLDCCLDC

16-32 bit processor >160-512kB (ROM+RAM) KVM support Limited power/battery, network, GUI, Java class

libraries Devices include:

– Cell phones– Personal Digital Assistants– Pagers

CLDC Expert GroupCLDC Expert Group

America Online Bull Ericsson Fujitsu Matsushita Mitsubishi Motorola Nokia NTT DoCoMo

Oracle Palm Computing RIM Samsung Sharp Siemens Sony SunMicrosystems Symbian

CLDC PackagesCLDC Packages

CLDC packages:– java.lang– java.io– java.util– javax.microedition.io

CLDC CLDC

CLDC limitations:– No Floating-point Support– No Finalization– Error Handling Limitations– Limited Internationalization Support

MIDP – MIDP – Mobile Information Device ProfileMobile Information Device Profile

MIDP + CLDC = Part of J2ME Runtime Environment

MIDP addresses:– User Interface– Persistent storage– Networking– Application model

MIDP PackagesMIDP Packages

MIDP Packages:

– javax.micoredition.io– javax.microedition.midlet– javax.microedition.lcdui– javax.microedition.rms

What is a MIDlet?What is a MIDlet?

MIDP Application = MIDlet

MIDlet is similar to applet.

MIDlet Structure:– startApp()– pauseApp()– destroyApp(boolean unconditional)

MIDlet’s Life CycleMIDlet’s Life Cycle

destroyApp( )

PausedPaused

pauseApp( )

ActiveActive

DestroyedDestroyed

destroyApp( )

startApp( )

Hello MidletHello Midletimport javax.microedition.midlet.*;import javax.microedition.lcdui.*;

public class HelloMidlet extends MIDlet{ private Display display; TextBox box = null;

public HelloMidlet() { }

public void startApp() { display = display.getDisplay(this); box = new TextBox("Midlet Example", "Hello CS616", 20, 0); display.setCurrent(box); }

public void pauseApp() { }

public void destroyApp(boolean unconditional) { }}

Hello MidletHello Midlet

J2ME Wireless ToolkitJ2ME Wireless Toolkit

Developer OpportunitiesDeveloper Opportunities

Mobile Internet servicesValue added servicesBusiness to business apps

A Wireless “Safe Home”A Wireless “Safe Home”

Java Enabled Device FutureJava Enabled Device Future

“In 2002, Nokia will deliver more than 50 million Java enable phones; more than 100 million deliveries by end of 2003.”

Pekka Ala-Pietila,Nokia President, JavaOne, 2001