Download presentation
Presentation is loading. Please wait.
Published byErika Robbins Modified over 6 years ago
1
By Jeff Heaton http://www.jeffheaton.com
An Overview of J2ME By Jeff Heaton
2
Using J2ME with Wireless Devices
3
Have a J2ME Cell Phone?
4
What is J2ME? Java2 Micro Edition
J2ME provides a platform for smaller devices, such as (from smaller to Largest): Pagers Mobile Phones PDA’s Car Navigation Systems Internet Appliances Set-Top Boxes
5
The J2ME Universe
6
MIDP Mobile Information Device Profile
128KB of non-volatile memory for the MIDP implementation 32KB of volatile memory for the runtime heap 8KB of non-volatile memory for persistent data Input capacity (screen, keyboard, touch) Screen size of at least 96x54 pixels Two-way network connection, possibly intermittent
7
MIDP vs J2SE No floating point (CLDC 1.0) No Object Finalization
No Reflection No Native Methods Threading, but no use of interrupt() No file-based I/O Many classes with fewer methods Collections (Vector, Hashtable & Stack)
8
MIDP API (familiar packages)
java.io java.lang java.lang.ref java.util
9
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
10
What makes up a MIDP Application
MIDP Applications are composed of two principle parts JAR File – Contains all of the classes and resources used by the application JAD File – Application descriptor, describes how to run the MIDP application
11
JAD Files Very simple NON-XML config file Application Name
MIDI version Copyright and version information Location of the JAR file
12
Example JAD File MIDlet-1: Jargoneer, Jargoneer.png, Jargoneer MIDlet-Jar-Size: 2369 MIDlet-Jar-URL: MIDlet-Name: Jargoneer MIDlet-Vendor: Unknown MIDlet-Version: 1.0 MicroEdition-Configuration: CLDC-1.0 MicroEdition-Profile: MIDP-1.0
13
Getting Started What do I need?
J2SE ( Sun’s J2ME Wireless Toolkit ( Internet Connection Publicly accessible website or public static IP address
14
Example: Using KToolbar and a Emulator
Live demo.
15
Deploying MIDP MIDP Applications are usually deployed Over the Air (OTA) Using a HTTP web site Can be distributed through vendor’s (i.e. Sprint) website (allows DRM) Also can be distributed directly from any website (no DRM)
16
Sprint Security
17
Deploying MIDP via Web Server
Place your JAR and JAD files in a public HTTP folder. For JAR files configure mime type: application/java-archive For JAD files configure mime type: text/vnd.sun.j2me.app-descriptor Point the cell phone at your JAD file: i.e.
18
Deploying from your computer
Install web server such as Apache Determine your IP address Setup mime-types Open port 80 on your firewall, if your ISP allows you to use port 80 Use another port (i.e ) if your ISP does not allow port 80 Access your website with your cell phone
19
Things to Watch out For ISP and Cell Phone Caching Cryptic error codes
Mime-Types Firewalls
20
Useful Web Resources Midlet Error Codes Deploy your J2ME Application Sun Microsystems J2ME
21
Conclusion Questions??
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.