1 / 25

JVM Introduction & Porting

JVM Introduction & Porting. Speaker: Ching-Wen Lin Date:2007.02.14. Outline. JVM Introduction Java 2 Edition J2ME Introduction JVM Porting CLDC Porting MIDP Porting MIDlet Design Introduction Design How to Use. How can do ?. Why Use Java ? Write once, run anywhere

afia
Download Presentation

JVM Introduction & Porting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JVM Introduction & Porting Speaker: Ching-Wen Lin Date:2007.02.14

  2. Outline • JVM Introduction • Java 2 Edition • J2ME Introduction • JVM Porting • CLDC Porting • MIDP Porting • MIDlet Design • Introduction • Design • How to Use

  3. How can do ? Why Use Java ? Write once, run anywhere Provide more services Multimedia Game Other Application Introduction (1/2)

  4. The Trend of Java Mobile Phone Introduction (2/2) 資料來源:資策會MIC~全球行動通訊軟體市場發展驅勢 2006.08.18

  5. Java 2 Edition (1/2) • Java2 is divided in three platform: • J2EE (Java2 Platform Enterprise Edition) • Business applications, server-side. • J2SE (Java2 Platform Standard Edition) • General applications, client-side. • J2ME (Java2 Platform Micro Edition) • Small devices such as mobile phone, PDA, car navigation. • JAVA CARD • Multiple applications can be deployed on a single card.

  6. Java 2 , Micro Edition Java 2 Edition (2/2)

  7. According different devices to define function. For Example : Screen size , Input method , Paint function …etc. According different CPU , network capability or power …etc. to define classes. For Example : WLAN and LAN use different driver. J2ME Structure • J2ME Structure

  8. Configuration

  9. MIDP (Mobile Information Device Profile) Define function for mobile phone(Ex: Message , Voice) Build on CLDC MIDP Version MIDP 1.0 The First MIDP version LCD at least 96*54 pixel minimum memory 32KB MIDP 2.0 The popular version LCD at least 96*54 pixel minimum memory 256KB Profile

  10. Java Community Process(JCP) http://jcp.org/ Java Specification Request (JSR) MIDP 1.0(JSR 37) MIDP 2.0 (JSR 118) CLDC 1.0(JSR 30) CLDC 1.1(JSR 65) The Optional Package JSR-82 Java API for Bluetooth JSR-135 Mobile Media API JSR-179 Location API for J2ME JSR-184 Mobile 3D Graphic API Optional Package

  11. JVM Porting

  12. Hardware CPU GDM 5105, GCT Memory Flash Memory, 8Mb Mobile SDRAM, 32Mb LCD 176*226 pixel Software OS ucLinux GDI Microwindow Porting Object CLDC 1.0 MIDP 2.0 P204 Spec.

  13. Download Open-Source: CLDC http://java.sun.com/products/cldc/ MIDP http://java.sun.com/products/midp/ J2ME Element: C Native Methods Connect with low-level Java Function Code How to Porting ?

  14. Configuration K Virtual Machine (KVM) Class , API The latest version CLDC 1.1 Add Float Point Porting Initializations Finalizations Heap’s Allocate and Free Fatal error reporting Event handling Time Process Configuration (CLDC Porting)

  15. Profile(MIDP Porting) • Low-level Graphics API • High-level Graphics API

  16. Example P204

  17. MIDlet Design

  18. MIDlet Design (1/2) • MIDlet (Mobile Information Device let) • The basic unit of Java Mobile Phone Program. • MIDlet Suite • Several MIDlet applications can pack in one JAR file , called MIDlet suite. • Including classes files and relevant resources (Ex: graph, sound …etc.) • JAM (Java Application Manager) • Java support to manger MIDlet Suite.

  19. MIDlet Design (2/2) • JAD (Text File) • Describe MIDlet Suite’s properties. • JAR(ZIP Compressed File) • MIDlet and other class files • Resource : Image , text , sound … etc. • Manifest.mf: Descript MIDlet basic data.

  20. MIDlet Design Flowchart

  21. MIDlet Source Code import javax.microedition.midlet.*; public class HelloMIDlet extends MIDlet { public HelloMIDlet() { // Structure } public void startApp() { // Start } public void pauseApp() { // Pause } public void destroyApp(l) { } } MIDlet Life Cycle MIDP Code

  22. How to Use ? • OTA (Over The Air) • Through wireless to download MIDlet. • No OTA • Transmission Line • IR • Bluetooth • MMS • E-mail

  23. MIDlet Download Flowchart

  24. P204 Support : Basic Operation Text Image: PNG,JPG,GIF…etc Provide Double Buffer Sound:MIDI JVM Demo

  25. Thanks for your listening !

More Related