Introduction To Java 2 Platform
Introduction To Java 2 Platform
Introduction To Java 2 Platform
Presented By:
Contents
What’s J2ME?
Java Editions
J2ME core concepts
Configurations (CLDC, CDC)
Profiles (MIDP)
MIDP and MIDlets
Basic Classes API
Java Technology Carriers
Java Technology Handsets
Overall Evaluation
J2ME 2
Introduction
Personalized and intelligent information
appliances are necessities in our life today.
Such appliances can be:
cell phones
two-way pagers
smart cards
personal organizers
palmtops
These appliances tend to be special-purpose,
limited-resource, network-connected devices.
J2ME 3
Environment requirements
We need an environment which is adapted
for constrained devices - devices that have
limitations on what they can do when
compared to standard desktop or server
computers.
The constraints are:
extremely limited memory
small screen sizes
alternative input methods
slow processors
J2ME 4
At the JavaOne Conference in June 1999,
Sun Microsystems announced a new edition
of the Java 2 platform: the Java 2 Micro
Edition (J2ME).
J2ME 5
Java Editions
Different devices have different
requirements and different expectations of
Java.
One platform (solution) cannot address all
the market segments (web server, video
games etc.)
Users/developers want flexibility. They
want to choose what they want to use and
what they do not.
J2ME 6
Java Editions
The Java 2 Platform is split into three
editions.
Each edition provides a complete
environment for running Java-based
applications, including the Java virtual
machine (VM) and runtime classes.
The three editions target different kinds of
applications running on different kinds of
devices.
J2ME 7
Java Editions
Java 2 Platform
J2ME 8
Java Editions
J2ME 9
Java Family
What is J2ME
J2ME 12
Sun Microsystems’ Web site
describes J2ME this way:
J2ME 13
J2ME Core Concepts
J2ME 14
J2ME Category
Principle: Different hardware corresponds different JVMs, hardware which base on CDC have
powerful JVMs, and hardware which base on CLDC have KVM to support.
J2ME Model
Configurations
J2ME 17
Configurations
Configuration
CLDC CDC
J2ME 18
Connected Device Configuration (CDC)
19
Connected, Limited Device
Configuration (CLDC)
Covers mobile devices like mobile phones, PDAs,
pagers, and other "tiny" wireless devices
For smaller devices than CDC, with limited capacity
and network connection
For devices with 160KB to 512 KB of memory
available for Java platform
For devices with limited power supply
Built on "scale-down" version of JVM called KVM
(Sun 'K Virtual Machine, with size in tens of
kilobytes, rather than JVM with tens of megabytes)
20
J2ME Core Concepts
J2ME 21
Profiles
J2ME 22
Profiles
Profile
J2ME 23
MIDP – MID Profile
J2ME 24
MIDP - Specification
J2ME 25
MIDP - Specification
J2ME 26
MIDP Applications restrictions
J2ME 27
MIDP API
(familiar packages)
java.io
java.lang
java.lang.ref
java.util
MIDP API
(no so familiar packages)
javax.microedition.io
javax.microedition.lcdui
javax.microedition.lcdui.game
javax.microedition.media
javax.microedition.media.control
javax.microedition.midlet
javax.microedition.pki
javax.microedition.rms
MIDP and MIDlets
30
MIDlet states
31
MIDlets – The heart of J2ME…
J2ME 32
J2ME Core Concepts
J2ME 33
Optional Packages
J2ME 34
What it all means
"J2ME application" is an ambiguous term.
Configuration, profile and optional
packages should be chosen.
CDC-based profiles make development
simpler due to J2SE-like APIs, but don’t suit
the low-end devices.
CLDC-based profiles makes the
development task harder, especially when
trying to shrink the size of the application
to run on many of the small devices.
J2ME 35
Java Technology
Carriers
Java Technology
Handsets
To date, over 250 different handset models from more than 40 manufacturers
have been developed with Java technology, with more than 100 million of these
handsets shipped worldwide.
Overall Evaluation
Advantages
Easy to learn
Learning J2ME is like learning Java programs
Platform independent
The layering architecture of the J2ME
programming model allows MIDlets
(applications for mobile devices) to run on
different mobile devices (Java systems).
Build on top of an operating system and
All lower levels components are hided by the
OS
Overall Evaluation
Integration with other Java
components
Can build complex mobile applications
using with least effort by integration with
other Java components
Good for security-oriented applications,
which use cryptographic classes
Can build wireless Internet applications
Overall Evaluation
Limitations
Multimedia applications
Performance-intensive applications
Overall Evaluation
There are more than 2.1 billion Java ME
enabled mobile phones and PDAs, but it is
becoming old technology as it is not used
on any of today's newest mobile platforms
(eg iPhone, Android, Windows Phone 7,
MeeGo, BlackBerry's new QNX).
Getting Started…
J2ME 42
Thanks