Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 9
Introduction
JavaME is the short form for Java 2 Micro Edition.
JavaME is meant for tiny devices such as mobile
phones, TV set top boxes, pagers, PDAs etc.
Java Platform, Micro Edition (JavaME) is Used to
compute, small programs that could be
downloaded and run on demand.
Java is important for two reasons:
Developers can write code and have it run on
dozens of small devices, without change.
Java has important safety features for
downloadable code.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 10
Introduction
JavaME was designed with the following
considerations for portable devices:
Limited processing power.
Limited system memory.
Limited storage capacity.
Small display.
Less Battery power.
Limited connectivity to internet.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 11
Introduction
The JavaME applications can be used to do many
useful things. A few of the capabilities of a J2ME
program are:
Making UDP connections back to the server or
communication between two devices.
Making HTTP connections back to a HTTP server to
make rich applications
Making Socket connections
Bar Code scanning
Bluetooth programming
Many other programs limited only by your
imagination.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 12
Understanding J2ME
JavaME is divided into:
Configurations
Profiles
Optional APIs
A configuration is a specification that defines the
software environment for a range of devices defined
by a set of characteristics that the specification relies
on, usually
The types and amount of memory available.
The processor type and speed.
The type of network connection available to the
device
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 13
Understanding J2ME
A configuration is designed for a specific kind of
device based on memory constraints and processor
power.
A configuration is supposed to represent the
minimum platform for its target device and is not
permitted to define optional features.
A profile is based on a configuration and provides
additional APIs.
There two types of configurations :
Connected Device Configuration (CDC).
Connected, Limited Device Configuration (CLDC)
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 14
Understanding J2ME
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 15
Connected Device Configuration
CDC addresses the needs of devices that lie
between those addressed by CLDC and the full
desktop systems running JavaSE.
These devices have more memory (typically 2 MB
or more) and more capable processors, and they
can, therefore, support a much more complete
Java software environment.
Each configuration consists of a Java virtual
machine and a core collection of Java classes that
provide the programming environment for
application software.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 16
Connected Device Configuration
The configuration is designed for devices with:
A minimum of 512KB of read-only memory
(ROM).
A minimum of 256KB of random access memory
(RAM).
Some kind of network connection.
CDC might be found on high-end PDAs and in
smart phones, web telephones, residential
gateways, and set-top boxes.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 17
Connected Limited Device Configuration
CLDC is aimed at the low end of the consumer
electronics range.
CLDC is closely associated with wireless Java, which
is concerned with allowing cell phone users to
purchase and download small Java applications
known as MIDlets to their handsets.
CLDC was designed for devices with:
160KB to 512KB of total memory.
A minimum of 160KB of ROM.
32KB of RAM available for the Java platform.
CLDC is based around a small JVM called the KVM.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 18
Connected Limited Device Configuration
Describes devices having :
Limited display and input.
Limited memory.
Limited CPU power.
Limited battery life.
Limited network connection.
CLDC encompasses:
Mobile phones
Pagers
PDAs
Other smaller devices than those targeted by the CDC.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 19
Profiles
A profile is layered on top of a configuration,
adding the APIs and specifications necessary to
develop applications for a specific family of
devices.
Foundation Profile:
Is a specification for devices that can support a rich
networked JavaME environment and does not
support a user interface
Other profiles can be layered on top of the
Foundation Profile to add user interface support
and other functionalities.
Used with Connected Device Configuration.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 20
Profiles
Personal Basis Profile:
Is a superset of the Foundation Profile APIs and
supports devices with lightweight GUI requirements.
The profile comes with a framework for building
lightweight GUI components and supports some
Abstract Window Toolkit (AWT) classes.
Adds basic user interface functionality to the
Foundation Profile.
Intended to be used on devices that have an
unsophisticated user interface capability, and it
therefore does not allow more than one window to be
active at any time.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 21
Profiles
Personal Profile:
Extends the Personal Basis Profile with a GUI
toolkit based on the AWT.
Intended for platforms that can support a more
complex user interface.
It provides a complete Java ME application
environment with full AWT support and is intended
for higher-end devices like PDAs, set-top boxes,
game consoles, and so on.
Also layered on top of the Foundation Profile.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 22
Profiles
RMI Profile:
Adds the JavaSE Remote Method Invocation
libraries to the Foundation Profile. Only the client
side of this API is supported.
Game Profile:
Is still in the process of being defined.
Will provide a platform for writing games software
on CDC devices.
It is not certain whether this profile will be derived
from the Foundation Profile or based directly on
CDC.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 23
Profiles
PDA Profile (PDAP):
Built on CLDC, and designed for palmtop devices
with a minimum of 512KB and a maximum of 16MB
for combined ROM and RAM.
Also aimed at PDAs that have better screens and
more memory than cell phones.
It sits midway between the Mobile Information
Device Profile (MIDP) and the Personal Profile.
Includes an application model based on MIDlets
but uses a subset of the J2SE Abstract Windowing
Toolkit (AWT) for graphic user interface.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 24
Profiles
MIDP — Mobile Information Device Profile is
the set of APIs that provides higher-level
functionality required by mobile applications, such
as displayable components (“screens”) and network
communication.
Adds networking, user interface components, and
local storage to CLDC.
It is primarily aimed at the limited display and storage
facilities of mobile phones.
Provides a relatively simple user interface and basic
networking based on HTTP.
It is the basis for Wireless Java and is currently the only
profile available for PalmOSbased handhelds.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 25
Mobile Information Device Profile
MIDP has the following characteristics:
A minimum of 256KB of ROM for the MIDP
implementation (this is in addition to the
requirements of the CLDC).
A minimum of 128KB of RAM for the Java runtime
heap.
A minimum of 8KB of nonvolatile writable memory
for persistent data.
A screen of at least 96×54 pixels.
Some capacity for input, either by keypad,
keyboard, or touch screens.
Two-way network connection, possibly intermittent
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 26
Mobile Information Device Profile
There are two versions of MIDP:
MIDP 1.0
MIDP 2.0.
Many of the currently available devices do and all
new devices will support MIDP 2.0.
MIDP 2.0 features a number of enhancements:
Support for multimedia.
Anew game user interface API.
Support for HTTPS connection, and other
features.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 27
Advantages of MIDP
Portability.
An application written using the MIDP APIs will
be directly portable to any MIDP device. MIDP
applications seamlessly run on multiple
platforms.
Security.
Java is well known for its ability to safely run
downloaded code like applets. JVM used in the
CLDC only implements a partial bytecode
verifier, which means that part of the important
task of bytecode verification must be performed
off the MIDP device.
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 28
Disadvantages of MIDP
Limited API as compared to Java EE and
Java SE.
Application running process is slow.
It is difficult to access some device features
(may require third party libraries).
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 29
JavaME Resources
JavaSE API documentation, JDK and JRE
[Link]
JavaME Tools
[Link]
JavaME Online
[Link]
22
[Link]
orials
[Link]
Monday, September 21, 2015 By: Ambrose Njeru [BSc, Msc Computer Science] 30