Title: JavaME: ????????
1(No Transcript)
2JavaME ????????
- ????? ?????????
- boris.kvartskhava_at_oracle.com
3??? ????? JavaME?
- JCP Java Community Process - 2 ????????
- Standard/Enterprise - Micro Edition -
JSR Java Specification Request (?????? ??
???????????? Java) - ???????????? Java - ??
(JSR-??) ?????, ?????? - JSR 118 MIDP
2.0/2.1 - JSR 139 CLDC 1.1 -
???????????? JSR ???????? - c???????????
API ? ???? .class ??????, ? ???????? ?????
????????????? ?????????? - ??????????
(????????, ?????????? ?????? JSR)
????????, ?? ?????????? ?? ????? ???? ??????????
MMAPI (JSR135), ???? ?? ?????????? CLDC
??? CDC
4JSR ??????? ?? - ???????????? - ?????? ??????
(TCKTechnology Compatibility Kit) - ?????????
?????????? - ????????? ??? ??????????
???????????? - ???????? ???? ?????
?????? ??? ??????? ???????????? ???????????
JSR? ??????! ???? - http//jcp.org/en/home/index
? ??????? ????? ?????. ????, http//jcp.org/en/j
sr/summary?idXXX ????????, MIDP
http//jcp.org/en/jsr/summary?id118
5??????1 ????????? ???????????? MIDP
2.1 http//jcp.org/en/jsr/summary?id118 ??????2
????????? ???????????? CLDC 1.1 http//jcp.org
/en/jsr/summary?id139
6(No Transcript)
7???????? ? ??????? - ??? ????? ????????? API?
??? ????? ????????? ? ????? ????????? ??????????
????? java.lang.Object (??????? ??? O) ?
????????????? CLDC 1.1 ? CDC 1.1 - ????????
????????, ??? ??? ?????? O ? CLDC 1.1 ?????
???????????? ? CDC 1.1 - ???? ?????? ? O ? CDC
1.1, ??????? ??? ? CLDC 1.1 - ??? ?????? ??????
? O ? CLDC 1.1, ??????? ???? ?? ??????
???????????? ???. - ???????????? ?????? ?????? O
? CLDC 1.1 ? CDC 1.1 - ?? ????????????.
8????? ???????, ??? ????????? ??????, ????,
?????? ??? ?????????? ???????, ?? ???????
???? ??????? API ?????????? ????????????????. ??
????? - public final void java.lang.Object.wait(
long,int) (???? ? ? CLDC 1.1 ? ? CDC 1.1) -
public class java.lang.Object - public void
java.lang.Runnable.run() - public interface
java.lang.Runnable - public class java.io.File
extends java.lang.Object implements
java.io.Serializable, java.lang.Comparable ?????
Java API ????? ????????????? ???
????????????????? (?????? ?????????? ??????,
???? ??????!).
9??? ???? ???????? ??????? ?????? ???? ???
??? ?????? ????? ?????? ???????? ? runtime ?
???? ???. ? ????????? ?????? ???????? -
????????? ?? ?????? ????????? ??? ?????. ?
????????? ??????? ???????? - ??? ?????
?????????? ? ?????????? - ???????? ???????
?????????? ??????? ????? ??????????? ?? ????
???????. ??????? ??????? ?????????????? ?????
? ?? ???????? ? ??????????? LinkageError-s.
10- JavaME
- ????? JavaME ??????????
- (??????? ???????, ????? Java ?? ????????,
- ?????????? ? ??.) ?????? ????????
- - ???????????? (Configuration) ????? ????!
- (?????? CLDC ??? CDC)
- - ??????? (???? ??? ????).
- (?????? MIDP ??? PBP)
- - ???????????? (??????????????) ??????.
- 0 ??? ????? ??.
- ??????? JSR 135(MMAPI), JSR 211(CHAPI).
-
11????? ??? ?????? MMAPI (JSR135) ???????????
????????? ?????/????? ???? ????????, ?? ???????
?????? ?? ???????? ???????????? ??????????
(????????, ??????? ??????????????? ? ??). ??
????? ??????????? MMAPI ?????????????
????????????.
12???????????? (????? ???? ?? ??????????!) ???? -
Connected Limited Device Configuration (CLDC)
1.1 - ????????? ??????????? ??????, ???? ?
????????- ??? ?????????? ? ??????????, ??
??????? ????? ?? ??????????? - 162
????????? ?????? ??????? - 16- ??? 32-??????
????????? - ??????? ??????-???? ????????
(????????, COM) ??????????. ???? -
Connected Device Configuration (CDC)1.1 -
???????? ??????? - ???????????? ??????. - 4
????????? ??????
13????? ????? ????????? - CLDC 1.1 -
???????????? CDC 1.1 (?????????) - CDC 1.1
???????????? JavaSE specification 1.4.2 ,
??????? ???????, ?????????????? ????????? -
?????????, ?????????? ?? ???????????? CLDC 1.1,
????? ??????????????? ? ???????? CDC 1.1 -
?????????, ?????????? ?? ???????????? CLDC 1.1
????? ???????? ?? ? ?? CLDC 1.1, ? ?? CDC 1.1
- ???????, ??? ????????? ?????????? ?? ????. CDC
1.1 ????? ???????? ?? ?LDC 1.1.
14???????????? ????????? ????? ?????? ?????????, ??
??????? ?? ????? ???????. ??????? - ?????????
????? ??????. ???????????? ??????? JavaME -
???????? ?????????? ? ???????????? ?????????. -
???????? ???????????? ????????????. ?????,
????????, ???????? ????????? ??????????. -
????????? ???? ??????????? ?????????? ?
??????????????? ?????????. - ?????? - MIDP
1.0 ??????? ?????? CLDC 1.0 - MIDP 2.0
??????? CLDC 1.0 ??? CLDC 1.1
15?????? .class (?????) ??????. ????? ????? ????
????????? - ??? java ????????? ????????????? ?
.class ????? - ??????????? ?????? ?????????
.class ????? - ? ????? ????? ????????? ??????????
? ??? ?????? ClassFile u4 magic
u2 minor_version u2 major_version
- ?????? ??????????? ?????? ????????????
?????????? ????? ?????? ????? ??????. - CLDC
1.1 ? CDC 1.1 ???? ???????????? 1.4.2,
?????????????? ???????????? ?????? lt 48.0.
???? ?????????????? ??? ? ??????? JDK 1.5, ??
?????? ????? ?????? ????? 49.0. ???????????? ?
??????? javac -target 1.4 Hello.java
16???????????? ????? (0 ??? ?????) - ????????
(??? ???????, ???????????) ?????????? ?
??????????, ?? ??????? ?? ????? ?????????. -
?????? ???????? ?????????? ???????????? ?
??????? ?????? 1 ???? JSR 75 FileConnection
??????????, ?? - ?? ?????????? ????
???????? ??????? - ???????????? - ???
?????????????? CLDC 1.0 (???????? CLDC 1.1
??? CDC 1.0 ??? 1.1) ?????? 2 - MMAPI
???????????? ???????, ????? ???????????? ????
CLDC 1.0 (??? ?????, ??????? ?? ????????) -
????????? ????????? ??? ??????? ?????? ?????????
? ??????? ????? (????????, .mp3)
17??????? (???? ???? ????? ????, ???? ???) ????????
??????? JavaME - MIDP 2.0/2.1 (JSR118)
????????? ???????? - 256 kb ??????, ?????
????, ??? ??????? CLDC - ?? ??????? (?????
?????????), - ?????????????? ??????? 96x54,
1bpp (?? ????? ??? ???????????),
?????????????? ?????????? ???????. -
?????????? (ITU-T) ??????????. -
?????????????? http - ??c??? ????????????
???????? OTA/Provisioning (??????? ???????
- ???????? ?????????? ?? ???????) - 128k
?????? ??? ??????????? ???????.
18MIDP (MIDP 2.0/2.1JSR 118, MIDP 3.0JSR
271) ????????? ???????? - ????????
??????????????? ?????? ??? - ?????? ?
???????? (?????? ? ??????
javax.microedition.lcdui) - ABB
(javax.microedition.media). ?????? ?BB
???????? ????? ? ? JSR 135 MMAPI, ??? ???
ABB ????? ???????? ???????????? MIDP ?
MMAPI. - RMS-????????? ??-????,
Record Management System - ??? ?????????
????????? ?????? (persistent storage),
??????? ?????????? ????????. ?????? 8192
??????.
19- javax.microedition.pki - ?????? ?????????
??? ????????? ?????????? ??????????. -
javax.microedition.midlet ?????? ?????????? ???
????? ????????? ?? ???????? MIDP
??????????? ???????, ?????? ????? ????? ? ????
?????????? ???? ????? - ?????????
javax.microedition.midlet.MIDlet ????????,
main (public static void main(String))
?????? ? MIDP ?? ??????????????! - ???? I/O
(????, ???????? ??????? ? ??)
javax.microedition.io. ???????? ????????, ??????
java.lang.Object ? ???????????? MIDP ???! ??
????????? ? ???????????? CLDC.
20Personal Basis Profile/Personal Profile
(PBP/PP) - ???????? - ??????????? - ????????
????????????? - Bluray ????????????? ????????
- ?????? ?????? ? ???????? - ???? ??????
?????????? javax.microedition.xlet (???
?????????? ????????? ?????????
javax.microedition.xlet.Xlet) - ???? (java.net.,
javax.microedition.io, ?????????
???????????????? ??????????????) - ????????????
JavaSE (java.security) - ???? ?????????!
(java.lang.reflect) - ?????? ? ZIP ? JAR
????????
21 ?????????? c MIDP ?? ????? ??????? ?? -
????????? Sony Ericsson
http//en.wikipedia.org/wiki/Sony_Ericsson_Java_Pl
atform http//dwgs3.sonyericsson.com/cws/downlo
ad/1/724/181/1268293202/dw-101478-dg_java_me_s60_r
3a.pdf - ????????? Nokia Series40 ? Series
60 http//wiki.forum.nokia.com/index.php/Java
_ME_API_support_on_Nokia_devices - ??????,
????? JSR-? ??????????? ?? ?????
??????????? http//devices.j2mepolish.org/interac
tivedb/searchdevices.faces
22?????? ?????????? - CLDC/CDC ???? ????,
?????????? ?????. ??????? ?????? ????????????
?? ???????????? ??? ????????, ? ??????? ????
??????????????? ???? ?????? ??????????????, ???
?????????????? ????? ????? ??? ????? public
static void main(String) - MIDP
javax.microedition.lcdui.MIDlet (?????) - PBP
javax.microedition.xlet.Xlet (?????????) - PP
javax.microedition.xlet.Xlet
java.applet.Applet (?????) - JavaTV (????????
????????? ? PBP) javax.tv.xlet.Xlet -
JavaSE main, java.applet.Applet
23 AMS Application Management System ??
????, ??? ???????????? ???????,
?????????????????????????, ??????????? ????????
???????? ? ??????????????? (??????????) ??
??????????. ?????? ???????????????? ???
????????? Java. ?????? - Microsoft Windows
????? ?????????? ?????? ???????? -
?????????/???????? ???????? ? ??????
?????????? - ??????????? ???????
????????????? ??????????? ??????? ???????????
Windows AMS - Linux RPM ???????? ???????
??????????.
24????????? ??????? AMS (?????? Microsoft Office)
- ????? ?????????? (Application Package (AP))
???????? ????????? ?????????? ????
?????????????? ?????????? (???????, ??????????
? ??) - ?????????? (Application(A)) ????????
????? ?????. ??, ??? ????? ?????????. - AMS
????? - ????????????? (??????????????) AP
- ??????? (???????????????? AP) - ????? A ?
AP ? ????????? - ????????? AMS ?????
???????????????? AP ?? ?????????? ?
?????????????? ????????? ????? ????????? AP.
25 MIDP AMS ???????? - .jar (java
application archive) ??? ???????????? ????
.zip ?????. ??????? ??????? ? ??? ??????
????????? ???? META-INF\MANIFEST.MF. ?????
???????? ??? ?????? MF. - MF ??? ?????????
???? ? ?????????? ?????????????. (????????????
http//download.oracle.com/javase/1.3/docs/guide/j
ar/jar.html) - MF ???? ???????? ??????, ?
????????? ????????? - .jar ????? ??????????
???????? ltJDKgt/bin/jar.exe
26 MIDP AMSOTA/Provisioning 1. MIDP AP
MIDlet suite (?????? ?????) ??????? ?? ????
?????? - (????????????) .jar ???? ()
? ????? ??????? MIDlet-?? ?
??????????????? ????? ?????. ?? ????, .jar
? ???????? AP. .jar ??? ????? zip
????? (???? ????????? ????????)
MF ?????? ????????? ??????????? ?????????! -
(??????????????) .jad (java application
descriptor) ??????????????? ????????? ???? ?
????????? ? ??????? ?? JAR.
27 MIDP AMIDlet - ?????? MIDlet ? MIDP
???????????????? ????? MIDlet Suite ID (?????????
????????) ? ??? ?????? MIDlet-?. - ? runtime
????????? ??????? ????????? ?????? ??????, ???
? ???? ??? MIDlet (???? ??????????) ?????????
???? MIDLet-? - Paused ???? ?????? ???
??????, AMS ?????? pauseApp(), ??? MIDlet
???????? AMS ?????? NotifyPaused(),
startApp(), ????????? AMS, ??????
MIDletStateChangeException (MSCE) - Active
???? ?? ????? ? ???? ?????? startApp() -
Destroyed ???? ????? destroyApp(boolean)
????????? AMS, ??????? ?????????? (??
????????? ?????? ????? booleantrue ?
destroyApp() ?????? MSCE) - MIDlet ????????
AMS ? ???, ??? ?? ????, ??????
notifyDestroyed() - ????? ?????????? ??
pauseApp() ???????? ? Destroyed!
28 ???????
29(No Transcript)