J2ME Programming - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

J2ME Programming

Description:

We can run Java program in our mobile device (such as mobile phone, PDA) ... LastModified = Sun, 9 Jun 2002 16:45:54. HelloWorld (Make html file) ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 18
Provided by: SAN133
Category:

less

Transcript and Presenter's Notes

Title: J2ME Programming


1
J2ME Programming
Hiroyuki Akimoto
2
Contents
  • J2ME and its Technologies
  • i-appli Programming

3
Mobile Java
  • We can run Java program in our mobile device
    (such as mobile phone, PDA).

http//www.nokia.com/phones/9210/demo/intro_and_gu
ide.html
4
about J2ME
  • Java2 is divided into three platforms
  • J2EE (Java2 Enterprise Edition)
  • Business applications.
  • J2SE (Java2 Standard Edition)
  • General applications (In this lecture, using this
    platform).
  • J2ME (Java2 Micro Edition)
  • Small devices such as mobile phone, PDA, car
    navigation.

5
about J2ME
  • J2ME Platform needs configuration and profile.

6
CLDC (Connected Limited Device Configuration)
  • Mobile Phone Java use this configuration
  • Deleted features
  • Floating Point
  • Finalize
  • Thread Group
  • Java Native Interface (JNI)
  • Reflection
  • Weak References

7
Profiles for mobile phone
8
DoJa and MIDP
  • Differences between DoJa and MIDP

9
Detail of i-appli
  • DoCoMo 503, 504, 505,.. 900, FOMA
  • Limited capacity
  • 503i 10Kbyte
  • 504i 30Kbyte
  • 505,506 100K
  • 900 300K
  • Nonvolatile Memory Size
  • 503i 10Kbyte
  • 504i 100Kbyte
  • 505i 300K
  • 900 - 500-1M
  • Applications can connect to only downloaded server

10
How to make i-appli
  • API
  • JavaTM 2 SDK, Standard Edition Version 1.3.0 or
    later
  • CLDC
  • Emulator
  • J2ME Wireless SDK for the DoJa
  • i-jade popular emulator to run i-appli

11
How to make i-appli
  • Flow of development

Write i-appli Program
Compile
Preverify
gtjavac filename
gtpreverify classfile
Play i-appli with Your ke-tai!!
Make jar archive
Write jam and html
gtjar cfm classfile
12
Form of i-appli program
  • Need to extend IApplication class.

import com.nttdocomo.ui. public class
ClassName extends IApplication // Called
when this application is started public void
start() // Called when this application is
resumed public void resume()
13
Hello World (Source Code)
import com.nttdocomo.ui. public class
HelloWorld extends IApplication public void
start() HelloCanvas canvas new
HelloCanvas() Display.setCurrent(canvas)
public void resume() class HelloCanvas
extends Canvas public void paint(Graphics
g) g.drawString("Hello world",0,20)

14
Hello World (Compile)
  • Compile
  • javac bootclasspath CLDCAPI classpath DoJaAPI
    HelloWorld.java
  • Run (in emulator i-jade)
  • java jar i-jade.jar
  • Preverify
  • preverify classpath CLDCAPIDoJaAPI d .
    HelloWorld
  • Make jar archive
  • jar cfM HelloWorld.jar HelloWorld.class
    HelloCanvas.class

15
HelloWorld (Make jam file)
  • Sample jam file

AppName My First i-appli PackageURL
HelloWorld.jar AppSize 235 AppClass
HelloWorld LastModified Sun, 9 Jun 2002 164554
16
HelloWorld (Make html file)
  • If you have DoCoMos 503i, 504i phone, or above,
    you can visit this url and download this
    application.

lthtmlgt ltOBJECT declare idiappli
dataHelloWorld.jam typeapplication/x-jamgt lt/
OBJECTgt ltA ijamiappli hrefindex.htmgtMy
First i-applilt/Agt lt/htmlgt
17
References
  • J2ME Technologies (English)
  • http//java.sun.com/j2me/
  • Java Technologies for WIRELESS (Japanese)
  • http//jdc.sun.co.jp/wireless/
  • i-appli Specification (Japanese)
  • http//www.nttdocomo.co.jp/p_s/imode/java/index.ht
    ml
  • i-jade (Japanese)
  • http//www.zentek.com/i-JADE/ja/
  • Tutorial to make i-appli (Japanese)
  • http//www.kajas.com/tutorial/index.html
  • Amateur creaters i-appli search site (Japanese)
  • http//www.kajas.com/
Write a Comment
User Comments (0)
About PowerShow.com