You are on page 1of 21

J2ME Step by Step

Presented by:
John Papproth, Consultant
Bass & Associates, Inc.

May 16th, 2005

05/18/10 prepared by John Papproth, Bass & Associates Inc 1


Topics
 What is J2ME?
 Why use J2ME?
 How can I get started developing a J2ME
application?
 How can I get certified?
 Glossary
 Where can I get more information?

05/18/10 prepared by John Papproth, Bass & Associates Inc 2


What is J2ME?
 The Java 2 Platform, Micro Edition technology
consists of a virtual machine and a set of APIs
suitable for providing runtime environments
for consumer devices (things you carry with
you) and embedded electronics (things you
plug into a wall).
 J2ME has two primary kinds of components--
configurations and profiles

05/18/10 prepared by John Papproth, Bass & Associates Inc 3


Configurations
 Configurations are composed of two low-level
APIs and optimized virtual machines targeted
at two broad categories of devices:
 those with 128-512K of memory available

for the Java technology environment (and


applications)
 CLDC - Connected Limited Device Configuration
(CLDC); JSR 30, JSR 139
 those with 512K+ available for the Java
technology environment (and applications)
 Connected Device Configuration (CDC); JSR 36,
JSR 218

05/18/10 prepared by John Papproth, Bass & Associates Inc 4


Profiles
 Built upon a configuration.
 Provides a collection of APIs necessary to
provide a complete runtime environment for a
specific kind of device
 MIDP - Mobile Information Device Profile
(MIDP); JSR 37, JSR 118

05/18/10 prepared by John Papproth, Bass & Associates Inc 5


Optional packages
 API specifications that detail a set of
classes and methods targeted at a
certain kind of technology (media, for
example).

05/18/10 prepared by John Papproth, Bass & Associates Inc 6


Why use J2ME?
 Good question!
 You could use J2EE on the server and
Web-Enabled Browser technology on
the portable device.
 But …
 What happens when the network is

unavailable?

05/18/10 prepared by John Papproth, Bass & Associates Inc 7


Why?
 J2ME provides a development platform
that provides HTTP connectivity
combined with local data persistence.
 Your application has value without the
network! (collect information, stage
requests to the server, edit and validate
on the client…and the server)

05/18/10 prepared by John Papproth, Bass & Associates Inc 8


How can I get started developing a J2ME
application?

 NetBeans IDE and Mobility Pack is an


easy place to start!

05/18/10 prepared by John Papproth, Bass & Associates Inc 9


Any others?
 IBM’s WebSphere Studio Device
Developer
 Provides an integrated development

environment (IDE) for building,


testing, and deploying Java™ 2 Micro
Edition (J2ME™) applications that run
on wireless devices such as cellular
telephones, personal digital assistants
(PDA), and handheld computers.

05/18/10 prepared by John Papproth, Bass & Associates Inc 10


Do I need an IDE?
 You can download the J2ME Wireless
Toolkit and the J2SDK and …
 You don’t need no “stinkin’ IDE”.

 Some authors argue that an IDE gets

in the way of your understanding of


the process as you are learning…but
“I don’t need to be an electrician to
turn on the lights!”

05/18/10 prepared by John Papproth, Bass & Associates Inc 11


Free is good!
 But not always best!

05/18/10 prepared by John Papproth, Bass & Associates Inc 12


Things to consider!
 Screen landscape
 High latency
 Security

05/18/10 prepared by John Papproth, Bass & Associates Inc 13


Things to consider!
 Small screen landscape
 You’ll need to focus and reduce

clutter!
Desktop 1024 x 768

PDA
160x160

05/18/10 prepared by John Papproth, Bass & Associates Inc 14


Things to consider!
 High latency!……….slow
 Provide progress bars

 Design your application to allow the user

to cancel activities without causing


inconsistencies between the client and
server
 Access the network only when you need

to!
 Provide client side validation to reduce

long meaningless trips to the server!

05/18/10 prepared by John Papproth, Bass & Associates Inc 15


Things to consider!
 Security
 You’re letting your data walk around

with your client!


 Protect access to the server.

05/18/10 prepared by John Papproth, Bass & Associates Inc 16


Messaging...
 XML versus Binary
 Open versus Proprietary

 Large versus Small

 Secure?

 Fast?

 More than I need or want?

05/18/10 prepared by John Papproth, Bass & Associates Inc 17


How can I get certified?

05/18/10 prepared by John Papproth, Bass & Associates Inc 18


How can I get certified?
 Sun Certified Mobile Application
Developer (CX-310-110)
 Cost: $150.00

 Prometric Testing Centers

 Prerequisites: Sun Certified Programmer

for the Java 2 Platform (any edition)


 Number of questions: 68

 Pass score: 55% (38 items of 68)

 Time limit: 150 minutes

05/18/10 prepared by John Papproth, Bass & Associates Inc 19


Glossary:
 J2ME - Java 2 Micro Edition
 CDLC - Connected Limited Device
Configuration
 MIDP - Mobile Information Device Profile
 JAD - Java Application Descriptor used to install
J2ME applications
 PRC - Palm Resource CODE (PRC) executable
files

05/18/10 prepared by John Papproth, Bass & Associates Inc 20


Where to Get More
Information
 http://java.sun.com/j2me/
 http://java.sun.com/blueprints/wireless
 http://developers.sun.com/prodtech/javatools/mobility/do
wnloads/index.jsp
 http://java.sun.com/products/midp4palm/
 http://www.palmos.com/dev/tech/java/
 http://www-306.ibm.com/software/wireless/wsdd/
 http://www.sun.com/training/catalog/courses/CX-310-
110.xml
 http://onjava.com/topics/java/Wireless_Java

05/18/10 prepared by John Papproth, Bass & Associates Inc 21

You might also like