Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java 2 Micro Edition (J2ME) and the world of java

Similar presentations


Presentation on theme: "Java 2 Micro Edition (J2ME) and the world of java"— Presentation transcript:

1 Java 2 Micro Edition (J2ME) and the world of java
J2ME - Lecture 8 Java 2 Micro Edition (J2ME) and the world of java The Java 2 Platform, Micro Edition (J2ME) provides a flexible environment for applications running on consumer devices, such as mobile phones, PDAs, and TV set-top boxes, as well as a broad range of embedded devices. J2ME includes Java virtual machines and a set of standard Java APIs It includes flexible user interfaces, a robust security model, a broad range of built-in network protocols, and extensive support for networked and offline applications Programming Mobile and Handheld Devices

2 The J2ME Architecture The J2ME architecture comprises a variety of configurations, profiles, and optional packages that implementers and developers can choose from

3 J2ME Configurations and Profiles
Even within J2ME one size does not fit all Configurations: Minimum libraries and JVM Profiles: libraries for specific devices or markets J2ME configurations CLDC CDC J2ME profiles MIDP Foundation, Bluetooth, Personal, ... Configurations and profiles defined by the Java Community ProcessSM

4 Configurations Configurations comprise
J2ME - Lecture 8 Configurations Configurations comprise a virtual machine a minimal set of class libraries. They provide the base functionality for a particular range of devices that share similar characteristics, such as network connectivity and memory footprint. Currently, there are two J2ME configurations: the Connected Limited Device Configuration (CLDC) Established and widely used the Connected Device Configuration (CDC) Next generation configuration * * FUNCTION: PilotMain * DESCRIPTION: This is the main entry point for the application. * PARAMETERS: cmd - word value specifying the launch code. * cmdPB - pointer to a structure that is associated with the launch code. * launchFlags - word value providing extra information about the launch. * RETURNED: Result of launch As is usual in Palm applications, PilotMain calls AppStart, AppEventLoop and AppStop to do the work Programming Mobile and Handheld Devices

5 J2ME - Lecture 8 Profiles To provide a complete runtime environment for a specific device category a configuration must be combined with a profile This is a set of higher-level APIs that further define the application life-cycle model, the user interface, and access to device-specific properties. A profile supports a narrower category of devices within the framework of a chosen configuration. A widely adopted example is to combine CLDC with the Mobile Information Device Profile (MIDP) to provide a complete Java application environment for cell phones and other devices with similar capabilities Programming Mobile and Handheld Devices

6 J2ME - Lecture 8 Optional Packages The J2ME platform can be extended by adding various optional packages to a technology stack that includes either CLDC or CDC and an associated profile. Optional packages offer standard APIs for using both existing and emerging technologies such as database connectivity, wireless messaging, multimedia, Bluetooth, and web services. Because optional packages are modular, developers can avoid carrying the overhead of unnecessary functionality by including only the packages an application actually needs. Programming Mobile and Handheld Devices

7 J2ME - Lecture 8 Programming Mobile and Handheld Devices

8 Mobile Information Device Profile
J2ME - Lecture 8 Mobile Information Device Profile The first J2ME profile Targets devices implementing CLDC Profile addresses: Display toolkit, user input methods Persistent data storage Messaging( SMS, , etc), security and networking over wireless network connection Programming Mobile and Handheld Devices

9 Related Technologies: Java Card™ Technology
J2ME - Lecture 8 Related Technologies: Java Card™ Technology Specifies minimized subset of Java technology for GSM SIM cards, smart cards, Java rings, and other extremely constrained devices Key benefits versus non-Java smart cards Multiple applications per card Post-issuance updates to apps on card Programming Mobile and Handheld Devices

10 Related Technologies: EmbeddedJava™ Technology
J2ME - Lecture 8 Related Technologies: EmbeddedJava™ Technology EmbeddedJava. technology is a program from Sun supporting development of dedicated-function embedded devices for a wide range of end uses EmbeddedJava technology gives device manufacturers the ability to: Configure the Java platform to leave out unneeded classes and VM features Minimize resource requirements and cost for a deeply-embedded device Optimize for devices with no GUI and intermittent (at best) networking Keep APIs for their devices private Programming Mobile and Handheld Devices

11 J2ME™: Connected Device Configuration
J2ME - Lecture 8 J2ME™: Connected Device Configuration Connected Device Configuration (CDC) Targeted for devices that have 2 MB or more total available memory Memory dedicated to J2ME environment More than 2MB ROM/Flash More than 512 KB RAM Network connectivity Full Java 2 Virtual Machine specification Programming Mobile and Handheld Devices

12 Example J2ME™ CDC Uses Wireless communicators High-end PDAs
J2ME - Lecture 8 Example J2ME™ CDC Uses Wireless communicators High-end PDAs TV set-top boxes Gateways Automotive entertainment and navigation systems Telecomm/Networking Equipment Industrial Controllers Programming Mobile and Handheld Devices

13 What Is CVM? Basis for J2ME CDC and profiles
J2ME - Lecture 8 What Is CVM? Basis for J2ME CDC and profiles Large VMs for desktops/servers don.t scale well to devices Static and dynamic memory footprint too big Not embeddable, ROMable, not portable Implicit assumption of virtual memory Native stack use, address range reservation Implicit assumption of process model Global variables, .system threads. Programming Mobile and Handheld Devices

14 CVM features CVM supports all Java 2 Platform, version 1.3,
J2ME - Lecture 8 CVM features CVM supports all Java 2 Platform, version 1.3, VM features and libraries for security, weak references, JNI, RMI and JVMDI CVM allows devices to map Java threads directly to native threads. Can run Java classes out of ROM Contains a precise memory system with advanced Garbage Collection features: Small average GC pause times Pluggable Garbage Collectors Full separation of VM from memory system Good JVM features Device friendliness. Easily re-targetable Narrow porting interface Almost entirely in C (except dynamic compiler) ~256KB with JNI, reflection, verification,. Programming Mobile and Handheld Devices

15 J2ME Profiles Mobile Information Device Profile (MIDP)
J2ME - Lecture 8 J2ME Profiles Mobile Information Device Profile (MIDP) Profile for wireless devices implementing CLDC J2ME Foundation Profile Profile for non-GUI networked devices implementing CDC J2ME Personal Basis, Personal, RMI Profiles Basic graphics, next generation PersonalJava environment, and RMI support for CDC & Foundation Profile based devices Programming Mobile and Handheld Devices

16 CDC APIs 􀀀 Defines minimum set of APIs for Java VM support
J2ME - Lecture 8 CDC APIs 􀀀 Defines minimum set of APIs for Java VM support java.lang VM system classes (Object, Thread, etc.) java.util.Underlying utilities java.net.UDP Datagram and File URL java.io.File java.text.I18n support for Java VM error messages java.security.Fine grain security and encryption for object serialization Programming Mobile and Handheld Devices

17 CVM Sizes Today CVM only Natives only Porting layer only
J2ME - Lecture 8 CVM Sizes Today CVM only Static ROM + RAM req.= 258 KB Natives only Static ROM + RAM req.= 124 KB Porting layer only Static ROM + RAM req.= 28 KB CVM+natives+porting_layer Static ROM + RAM req.= 410 KB Programming Mobile and Handheld Devices

18 Foundation Profile APIs
J2ME - Lecture 8 Foundation Profile APIs Defines core set of Java platform functionality No GUI Subset of JDK 1.3 Completes full functionality from CDC java.lang.Rounds out full java.lang.*(Compiler, UnknownError) java.util.Adds full zip support, Timer, etc. java.net.Adds TCP Socket and HTTP java.io.Rounds out full java.io.* (Readers and Writers) java.text.Full I18n (Annotation, Collator, Iterators, etc.) java.security.Adds Code Signing and Certificates Programming Mobile and Handheld Devices

19 CVM Sizes with Foundation Profile APIs
J2ME - Lecture 8 CVM Sizes with Foundation Profile APIs CDC Java libraries (ROMized) Static ROM + RAM req.= 1011 KB Foundation Java libraries (ROMized) Static ROM + RAM req.= 1564 KB CDC TOTAL (CVM+natives+porting+libraries) Static ROM + RAM req.= 1421 KB Java libraries + natives for Foundation Profile Static ROM + RAM req = 553 KB Foundation TOTAL (CVM+natives+porting+libraries) Static ROM + RAM req.= 1974 KB Programming Mobile and Handheld Devices


Download ppt "Java 2 Micro Edition (J2ME) and the world of java"

Similar presentations


Ads by Google