SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Introduc)on	
  to	
  Java	
  ME	
  

        Jussi	
  Pohjolainen	
  
INTRO	
  TO	
  JAVA	
  ME	
  PLATFORM	
  
About	
  Java	
  ME	
  
•  Java	
  ME	
  (J2ME	
  is	
  older	
  name..)	
  is	
  the	
  world’s	
  
     most	
  widespread	
  mobile	
  applica>on	
  
     pla@orm	
  
•  Developed	
  by	
  Sun	
  Microsystems	
  and	
  bought	
  
     by	
  Oracle	
  
	
  
	
  
Why?	
  
•  So	
  why?	
  Market	
  reach!	
  
•  Over	
  80%	
  of	
  phones	
  worldwide	
  supports	
  Java	
  
   ME!	
  
•  It’s	
  possible	
  to	
  create	
  awesome	
  apps	
  with	
  new	
  
   really	
  powerful	
  APIs:	
  GPS,	
  Sensors,	
  3D	
  
   Graphics,	
  Touch	
  etc..	
  
•  Hardware	
  geOng	
  more	
  powerful	
  and	
  less	
  
   expensive	
  
S40	
  Touch	
  and	
  Type	
  
•  Series	
  40	
  6th	
  Edi)on,	
  Feature	
  
   Pack	
  1	
  
•  Touch	
  enabled	
  phone	
  with	
  
   keyboard	
  
•  Java	
  ME	
  APIs:	
  Bluetooth,	
  Web	
  
   Services,	
  Loca)on,	
  Mobile	
  3D,	
  
   Wireless	
  Messaging,	
  SVG,	
  
   Mobile	
  Media	
  API,	
  Gesture	
  API..	
  
•  Price	
  in	
  Finland:	
  ~130	
  euros	
  
Java	
  Pla[orms	
  
•  Java	
  Standard	
  Edi>on	
  (Java	
  SE)	
  
    –  Designed	
  for	
  desktop	
  computers	
  
    –  Runs	
  on	
  top	
  of	
  OS	
  X,	
  Linux,	
  Windows	
  …	
  
•  Java	
  Enterprise	
  Edi>on	
  (Java	
  EE)	
  
    –  Mul)user,	
  enterprise-­‐wide	
  applica)ons	
  
    –  Based	
  on	
  J2SE	
  +	
  several	
  APIs	
  for	
  server-­‐side	
  compu)ng	
  
•  Java	
  Micro	
  Edi>on	
  (Java	
  ME)	
  
    –  For	
  )ny,	
  small	
  and	
  resource-­‐constrained	
  devices	
  
JAVA	
  ME	
  TECHNOLOGY	
  
Java	
  Edi)ons	
  

                                                                    Our	
  course	
  
                                                                   concentrates	
  
                                                                      on	
  this	
  

                                                                                               Java	
  ME	
  
                                              Op)onal	
  Packages	
  
Java	
  EE	
  
                       Java	
  SE	
               Personal	
  Profile	
         Op)onal	
  Packages	
  

                                              Founda)on	
  Profile	
                     MIDP	
  

                                                         CDC	
                          CLDC	
  




                 Java	
  Virtual	
  Machine	
                                           KVM	
  
JCP	
  and	
  JSR	
  
•  Java	
  Community	
  Process,	
  JCP,	
  is	
  a	
  formalized	
  
   process	
  which	
  creates	
  defini>ons	
  of	
  future	
  
   versions	
  and	
  features	
  of	
  the	
  Java	
  pla[orm.	
  
•  These	
  defini)ons	
  are	
  called	
  Java	
  Specifica)on	
  
   Requests,	
  JSR	
  
•  JSR	
  is	
  a	
  formal	
  document	
  that	
  describes	
  
   proposed	
  specifica)on	
  and	
  technology	
  
•  There	
  are	
  over	
  300	
  JSRs.	
  See	
  list	
  of	
  them	
  all.	
  
Java	
  ME	
  
                                                                                      Java	
  Me	
  

        Op)onal	
  Packages	
  


          Personal	
  Profile	
                        Op)onal	
  Packages	
  


                                             Mobile	
  Informa)on	
  Device	
  Profile	
  
        Founda)on	
  Profile	
  
                                                             (MIDP)	
  

Connected	
  Device	
  Configura)on	
  	
         Connected	
  Limited	
  Device	
  
               (CLC)	
                             Configura)on	
  (CLDC)	
  

                 JVM	
                                         KVM	
  
Kilo	
  Virtual	
  Machine	
  
•  KVM	
  is	
  similar	
  to	
  JVM,	
  runs	
  apps	
  wrifen	
  in	
  
   Java	
  –	
  language	
  
•  KVM	
  is	
  used	
  in	
  cell	
  phones,	
  where	
  JVM	
  is	
  used	
  
   on	
  computers	
  
•  Op)mized	
  for	
  small	
  size	
  
•  More	
  info:	
  KVM	
  White	
  Paper	
  
Java	
  ME	
  
                                                                                      Java	
  Me	
  

        Op)onal	
  Packages	
  


          Personal	
  Profile	
                        Op)onal	
  Packages	
  


                                             Mobile	
  Informa)on	
  Device	
  Profile	
  
        Founda)on	
  Profile	
  
                                                             (MIDP)	
  

Connected	
  Device	
  Configura>on	
  	
         Connected	
  Limited	
  Device	
  
               (CLC)	
                             Configura>on	
  (CLDC)	
  

                 JVM	
                                         KVM	
  
Configura)ons:	
  CLDC	
  
•  CLDC	
  (JSR	
  139)	
  
    –  Small	
  wireless	
  devices	
  with	
  intermiQent	
  network	
  
       connec)ons	
  
    –  Low	
  power	
  consump)on	
  
    –  Phones,	
  Pagers,	
  Bar	
  code	
  scanners..	
  
•  CDC	
  (JSR	
  36)	
  
    –  Larger	
  Devices	
  with	
  a	
  robust	
  network	
  connec)on	
  
    –  Set	
  top	
  boxes,	
  Internet	
  appliances	
  
CDC	
  -­‐	
  CLDC	
  

 smaller	
                                                                                                                                                                                                                                                                                         larger	
  


Pagers	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Mobile	
  Phones	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  PDAs	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Car	
  Naviga)on	
  Systems	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Internet	
  appliances	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Set-­‐top	
  Boxes	
  


      Connected	
  Limited	
  Device	
  Configura>on	
                                                                                                                               Connected	
  Device	
  Configura>on	
  	
  
                        (CLDC)	
                                                                                                                                                                  (CDC)	
  
CLDC	
  Func)onality	
  
•    Subset	
  of	
  Java	
  language	
  	
  
•    Subset	
  of	
  core	
  Java	
  SE	
  libraries	
  
•    Provides	
  basic	
  input	
  and	
  output	
  
•    Provides	
  basic	
  networking	
  support	
  
•    Security	
  
CLDC	
  Libraries	
  
•  CLDC	
  has	
  37	
  common	
  classes	
  from	
  Java	
  SE	
  
    –  java.lang:	
  Boolean,	
  Byte,	
  Integer,	
  Long,	
  String…	
  
    –  java.u>l:	
  Calendar,	
  Date,	
  Enumera)on,	
  
       Hashtable..	
  
    –  java.io:	
  InputStream,	
  OutputStream…	
  
•  CLDC	
  1.0	
  does	
  not	
  have	
  floa)ng	
  point	
  support	
  
•  CLDC	
  1.1	
  supports	
  floa)ng	
  point	
  
Java	
  ME	
  
                                                                                       Java	
  Me	
  

        Op)onal	
  Packages	
  


          Personal	
  Profile	
                         Op)onal	
  Packages	
  


                                             Mobile	
  Informa>on	
  Device	
  Profile	
  
        Founda)on	
  Profile	
  
                                                             (MIDP)	
  

Connected	
  Device	
  Configura)on	
  	
          Connected	
  Limited	
  Device	
  
               (CLC)	
                              Configura)on	
  (CLDC)	
  

                 JVM	
                                         KVM	
  
The	
  Mobile	
  Informa)on	
  Device	
  Profile	
  
                         (MIDP)	
  
•  Specifica)on	
  for	
  wireless	
  devices	
  
•  Provides	
  general	
  Java	
  libraries	
  for	
  developing	
  
   apps	
  for	
  wireless	
  devices	
  
•  Versions:	
  MIDP	
  1.0	
  (JSR	
  37)	
  and	
  MIDP	
  2.x	
  (JSR	
  
   118)	
  
•  MIDP	
  3.0	
  (JSR	
  271)	
  under	
  development	
  
•  Great	
  amount	
  of	
  devices	
  that	
  support	
  MIDP	
  
MIDP	
  Differences
                                      	
  
•  MIDP	
  1.0	
  
    –  Limited	
  graphics	
  and	
  sound	
  
    –  Only	
  HTTP,	
  no	
  Sockets	
  
•  MIDP	
  2.X	
  
    –  Game	
  API	
  
    –  Network	
  and	
  Mul)media	
  support	
  
•  MIDP	
  3.0	
  
    –  Background	
  MIDlets,	
  Improved	
  UI,	
  Localisa)on..	
  
MIDP	
  Sooware	
  Components	
  

                                Device	
  Specific	
  
MIDP	
  Java	
  App	
  	
  
                                  Java	
  App	
  	
  

 Op)onal	
  Java	
             Op)onal	
  Device	
  
  Packages	
                  Specific	
  Packages	
  
                                                                    Na)ve	
  Applica)on	
  
                         MIDP	
  


                         CLDC	
  


                                       Device	
  Opera)ng	
  System	
  
Example:	
  Nokia	
  N97	
  

                                Device	
  Specific	
  
MIDP	
  Java	
  App	
  	
  
                                  Java	
  App	
  	
  

 Op)onal	
  Java	
  
                                  Nokia	
  UI	
  API	
  
  Packages	
  
                                                                           Na)ve	
  Symbian	
  App	
  
                      MIDP	
  2.1	
  


                      CLDC	
  1.1	
  


                                               Symbian	
  OS	
  v9.3	
  
MIDP	
  Func)onality	
  
•    Applica)on	
  Life	
  Cycle	
  Management	
  
•    User	
  Interface	
  
•    Network	
  Connec)vity	
  
•    Game	
  support	
  
Java	
  ME	
  
                                                                                      Java	
  Me	
  

        Op)onal	
  Packages	
  


          Personal	
  Profile	
                        Op>onal	
  Packages	
  


                                             Mobile	
  Informa)on	
  Device	
  Profile	
  
        Founda)on	
  Profile	
  
                                                             (MIDP)	
  

Connected	
  Device	
  Configura)on	
  	
         Connected	
  Limited	
  Device	
  
               (CLC)	
                             Configura)on	
  (CLDC)	
  

                 JVM	
                                         KVM	
  
Op)onal	
  Packages,	
  JSRs	
  
•  File	
  Connec)on	
  and	
  PIM	
                  •    Content	
  Handler	
  API	
  
•  Bluetooth	
                                        •    SVG	
  1.0	
  
•  Wireless	
  Messaging	
  API	
  (WMA)	
            •    Payment	
  API	
  
•  Mobile	
  Media	
  API	
  (MMAPI)	
                •    Advanced	
  Mul)media	
  
•  Web	
  Services	
                                       Supplements	
  (AMMS)	
  
•  Security	
  and	
  Trust	
  Services	
             •    Mobile	
  Interna)onaliza)on	
  API	
  
•  Loca)on	
  API	
                                   •    Java	
  Bindings	
  for	
  the	
  OpenGL	
  ES	
  
•  SIP	
  API	
                                            API	
  
•  Mobile	
  3D	
  Graphics	
                         •    Mobile	
  Service	
  Architecture	
  
                                                      •    Mobile	
  Sensor	
  API	
  
•  Java	
  Technology	
  for	
  the	
  Wireless	
  
   Industry	
  (JTWI)	
                               •    SVG	
  2.0	
  
•  Wireless	
  Messaging	
  2.0	
  (WMA)	
  
Problems
                                    	
  
•      Different	
  screen	
  sizes	
  
•      Bugs	
  in	
  phones	
  
•      Performance	
  
•      Fragmenta)on,	
  JSRs	
  
	
  
Solu)on?	
  MSA	
  
MIDlet	
  Development	
  
How	
  to	
  Build	
  MIDlets?	
  
•  MIDlet	
  =	
  MIDP	
  Applica)on	
  
•  If	
  Java	
  SE	
  is	
  familiar,	
  MIDlet	
  development	
  is	
  
   easy	
  
•  Part	
  of	
  the	
  API	
  works	
  exactly	
  like	
  Java	
  SE	
  
•  Building	
  process	
  is	
  different	
  
Building	
  Process	
  
1.    Compile	
  
2.    Preverify	
  
3.    Compress	
  
4.    Create	
  JAD-­‐file	
  
5.    Upload	
  to	
  client	
  
1.	
  Compile	
  
•  Compile	
  a	
  MIDlet:	
  
    –  javac –bootclasspath midpclasses
        MyApp.java!
•  Use	
  now	
  base	
  classes	
  from	
  Java	
  ME!	
  
•  Aoer	
  the	
  compile,	
  one	
  must	
  preverify	
  the	
  
   result	
  
2.	
  Preverify	
  
•  It	
  is	
  cheched	
  in	
  the	
  preverifing	
  process	
  that	
  your	
  
   MIDlet	
  does	
  not	
  harm	
  the	
  client-­‐machine.	
  
•  In	
  Java	
  SE	
  this	
  checking	
  is	
  done	
  by	
  JVM.	
  KVM	
  
   does	
  not	
  have	
  this	
  kind	
  of	
  security	
  checking!	
  
•  Security	
  checking	
  is	
  done	
  in	
  two	
  parts	
  
    –  Preverify	
  before	
  sending	
  MIDlet	
  to	
  the	
  client	
  machine	
  
    –  Client	
  machines	
  own	
  check	
  
•  Command	
  line:	
  
    –  preverify –classpath .; midp
       classes –d . Midlet!
3.	
  Compress	
  
•  Aoer	
  the	
  MIDlet	
  is	
  compiled	
  and	
  preverified,	
  
   you	
  must	
  compress	
  all	
  the	
  classes	
  (and	
  
   resources)	
  into	
  one	
  jar-­‐file.	
  
•  Jar-­‐file	
  contains	
  also	
  MANIFEST.MF	
  -­‐	
  file,	
  
   which	
  describes	
  the	
  contents	
  of	
  the	
  jar-­‐file.	
  	
  
•  Compressing	
  with	
  the	
  jar-­‐tool:	
  
    –  jar cvmf manifest.mf MIDlet.jar
       MIDlet.class!
Example	
  of	
  Manifest	
  file	
  
MIDlet-1: MyMIDlet, MyMIDlet.png, MyMIDlet!
MIDlet-Name: MyMIDlet!
MIDlet-Vendor: Jussi Pohjolainen!
MIDlet-Version: 1.0!
MicroEdition-Configuration: CLDC-1.1!
MicroEdition-Profile: MIDP-2.1!
4.	
  Create	
  JAD	
  -­‐	
  file	
  
•  Java	
  Applica)on	
  Descriptor	
  file	
  describes	
  the	
  
   contents	
  of	
  MIDlet.	
  
•  Together,	
  .jad	
  and	
  .jar	
  are	
  called	
  MIDlet	
  Suite	
  
•  JAD-­‐file	
  is	
  used	
  so	
  that	
  the	
  client	
  machine	
  can	
  
   have	
  informa)on	
  about	
  the	
  sooware	
  before	
  
   installing	
  it.	
  
Example	
  of	
  JAD-­‐file	
  
MIDlet-1: MyMIDlet, MyMIDlet.png, MyMIDlet!
MIDlet-Jar-Size: 1056!
MIDlet-Jar-URL: MyMIDlet.jar!
MIDlet-Name: MyMIDlet!
MIDlet-Vendor: Unknown!
MIDlet-Version: 1.0!
MicroEdition-Configuration: CLDC-1.1!
MicroEdition-Profile: MIDP-2.1!
Distribu)on	
  

Preverified	
  classes	
  


                                                         Mobile	
  
  Resource	
  files	
           jar	
     Jar-­‐file	
  
                                                         Phone	
  


   Manifest	
  file	
                     Jad-­‐file	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Presentation from physical to virtual to cloud emc
Presentation   from physical to virtual to cloud emcPresentation   from physical to virtual to cloud emc
Presentation from physical to virtual to cloud emcxKinAnx
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2MERohan Chandane
 
07.flash memory technology
07.flash memory technology07.flash memory technology
07.flash memory technologyruchiusha
 
Track 3 - next generation computing
Track 3 - next generation computingTrack 3 - next generation computing
Track 3 - next generation computingEMC Forum India
 
Hyper v.nu-windows serverhyperv-networkingevolved
Hyper v.nu-windows serverhyperv-networkingevolvedHyper v.nu-windows serverhyperv-networkingevolved
Hyper v.nu-windows serverhyperv-networkingevolvedhypervnu
 
Cots moves to multicore: AMD
Cots moves to multicore: AMDCots moves to multicore: AMD
Cots moves to multicore: AMDKonrad Witte
 
Embedded is not special
Embedded is not specialEmbedded is not special
Embedded is not specialAnne Nicolas
 
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...Keshav Murthy
 
Java ME CLDC MIDP
Java ME CLDC MIDPJava ME CLDC MIDP
Java ME CLDC MIDPSMIJava
 
Building specialized industry apps using solr - By Rahul Agarwalla
Building specialized industry apps using solr - By Rahul Agarwalla   Building specialized industry apps using solr - By Rahul Agarwalla
Building specialized industry apps using solr - By Rahul Agarwalla lucenerevolution
 
Shunra VE Network Appliance
Shunra VE Network ApplianceShunra VE Network Appliance
Shunra VE Network ApplianceShunra Software
 
Xensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceXensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceThe Linux Foundation
 

Was ist angesagt? (17)

SDN
SDNSDN
SDN
 
Presentation from physical to virtual to cloud emc
Presentation   from physical to virtual to cloud emcPresentation   from physical to virtual to cloud emc
Presentation from physical to virtual to cloud emc
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2ME
 
07.flash memory technology
07.flash memory technology07.flash memory technology
07.flash memory technology
 
Programmable WAN Networking is SFW
Programmable WAN Networking is SFWProgrammable WAN Networking is SFW
Programmable WAN Networking is SFW
 
Performance Vision - What's new in version 2.9
Performance Vision - What's new in version 2.9Performance Vision - What's new in version 2.9
Performance Vision - What's new in version 2.9
 
Puppet for Junos
Puppet for JunosPuppet for Junos
Puppet for Junos
 
Java me introduction
Java me   introductionJava me   introduction
Java me introduction
 
Track 3 - next generation computing
Track 3 - next generation computingTrack 3 - next generation computing
Track 3 - next generation computing
 
Hyper v.nu-windows serverhyperv-networkingevolved
Hyper v.nu-windows serverhyperv-networkingevolvedHyper v.nu-windows serverhyperv-networkingevolved
Hyper v.nu-windows serverhyperv-networkingevolved
 
Cots moves to multicore: AMD
Cots moves to multicore: AMDCots moves to multicore: AMD
Cots moves to multicore: AMD
 
Embedded is not special
Embedded is not specialEmbedded is not special
Embedded is not special
 
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...
Performance and scalability of Informix ultimate warehouse edtion on Intel Xe...
 
Java ME CLDC MIDP
Java ME CLDC MIDPJava ME CLDC MIDP
Java ME CLDC MIDP
 
Building specialized industry apps using solr - By Rahul Agarwalla
Building specialized industry apps using solr - By Rahul Agarwalla   Building specialized industry apps using solr - By Rahul Agarwalla
Building specialized industry apps using solr - By Rahul Agarwalla
 
Shunra VE Network Appliance
Shunra VE Network ApplianceShunra VE Network Appliance
Shunra VE Network Appliance
 
Xensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceXensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization Performance
 

Ähnlich wie Introduction to Java ME

Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformJussi Pohjolainen
 
Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Marlon Luz
 
Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Marlon Luz
 
01 java 2 micro edition
01 java 2 micro edition01 java 2 micro edition
01 java 2 micro editioncorneliuskoo
 
Ben Pashkoff - java embedded - 24mai2011
Ben Pashkoff - java embedded - 24mai2011Ben Pashkoff - java embedded - 24mai2011
Ben Pashkoff - java embedded - 24mai2011Agora Group
 
Java Everywhere. Descubra la Internet de las Cosas
Java Everywhere. Descubra la Internet de las Cosas Java Everywhere. Descubra la Internet de las Cosas
Java Everywhere. Descubra la Internet de las Cosas GeneXus
 
Extending Android with New Devices
Extending Android with New DevicesExtending Android with New Devices
Extending Android with New DevicesShree Kumar
 
JavaME Development Workflow - JMDF 2007
JavaME Development Workflow - JMDF 2007JavaME Development Workflow - JMDF 2007
JavaME Development Workflow - JMDF 2007Edoardo Schepis
 
Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)Wambua Wambua
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Wambua Wambua
 
Introduction To SPOT
Introduction To SPOTIntroduction To SPOT
Introduction To SPOTpauldeng
 

Ähnlich wie Introduction to Java ME (20)

Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform
 
Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1Game Development for Nokia Asha Devices with Java ME #1
Game Development for Nokia Asha Devices with Java ME #1
 
Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1Nokia Asha App Development - Part 1
Nokia Asha App Development - Part 1
 
Sotona
SotonaSotona
Sotona
 
01 java 2 micro edition
01 java 2 micro edition01 java 2 micro edition
01 java 2 micro edition
 
Mobile Java
Mobile JavaMobile Java
Mobile Java
 
Ben Pashkoff - java embedded - 24mai2011
Ben Pashkoff - java embedded - 24mai2011Ben Pashkoff - java embedded - 24mai2011
Ben Pashkoff - java embedded - 24mai2011
 
Java J2ME
Java J2MEJava J2ME
Java J2ME
 
Java Everywhere. Descubra la Internet de las Cosas
Java Everywhere. Descubra la Internet de las Cosas Java Everywhere. Descubra la Internet de las Cosas
Java Everywhere. Descubra la Internet de las Cosas
 
Java me introduction
Java me   introductionJava me   introduction
Java me introduction
 
Java me introduction
Java me   introductionJava me   introduction
Java me introduction
 
Extending Android with New Devices
Extending Android with New DevicesExtending Android with New Devices
Extending Android with New Devices
 
J2 me 1
J2 me 1J2 me 1
J2 me 1
 
JavaME Development Workflow - JMDF 2007
JavaME Development Workflow - JMDF 2007JavaME Development Workflow - JMDF 2007
JavaME Development Workflow - JMDF 2007
 
J2me
J2meJ2me
J2me
 
Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)
 
Introduction To SPOT
Introduction To SPOTIntroduction To SPOT
Introduction To SPOT
 
Java1 in mumbai
Java1 in mumbaiJava1 in mumbai
Java1 in mumbai
 

Mehr von Jussi Pohjolainen

libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferencesJussi Pohjolainen
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationJussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDXJussi Pohjolainen
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDXJussi Pohjolainen
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDXJussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesJussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 

Mehr von Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 

Kürzlich hochgeladen

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Introduction to Java ME

  • 1. Introduc)on  to  Java  ME   Jussi  Pohjolainen  
  • 2. INTRO  TO  JAVA  ME  PLATFORM  
  • 3. About  Java  ME   •  Java  ME  (J2ME  is  older  name..)  is  the  world’s   most  widespread  mobile  applica>on   pla@orm   •  Developed  by  Sun  Microsystems  and  bought   by  Oracle      
  • 4. Why?   •  So  why?  Market  reach!   •  Over  80%  of  phones  worldwide  supports  Java   ME!   •  It’s  possible  to  create  awesome  apps  with  new   really  powerful  APIs:  GPS,  Sensors,  3D   Graphics,  Touch  etc..   •  Hardware  geOng  more  powerful  and  less   expensive  
  • 5. S40  Touch  and  Type   •  Series  40  6th  Edi)on,  Feature   Pack  1   •  Touch  enabled  phone  with   keyboard   •  Java  ME  APIs:  Bluetooth,  Web   Services,  Loca)on,  Mobile  3D,   Wireless  Messaging,  SVG,   Mobile  Media  API,  Gesture  API..   •  Price  in  Finland:  ~130  euros  
  • 6. Java  Pla[orms   •  Java  Standard  Edi>on  (Java  SE)   –  Designed  for  desktop  computers   –  Runs  on  top  of  OS  X,  Linux,  Windows  …   •  Java  Enterprise  Edi>on  (Java  EE)   –  Mul)user,  enterprise-­‐wide  applica)ons   –  Based  on  J2SE  +  several  APIs  for  server-­‐side  compu)ng   •  Java  Micro  Edi>on  (Java  ME)   –  For  )ny,  small  and  resource-­‐constrained  devices  
  • 8. Java  Edi)ons   Our  course   concentrates   on  this   Java  ME   Op)onal  Packages   Java  EE   Java  SE   Personal  Profile   Op)onal  Packages   Founda)on  Profile   MIDP   CDC   CLDC   Java  Virtual  Machine   KVM  
  • 9. JCP  and  JSR   •  Java  Community  Process,  JCP,  is  a  formalized   process  which  creates  defini>ons  of  future   versions  and  features  of  the  Java  pla[orm.   •  These  defini)ons  are  called  Java  Specifica)on   Requests,  JSR   •  JSR  is  a  formal  document  that  describes   proposed  specifica)on  and  technology   •  There  are  over  300  JSRs.  See  list  of  them  all.  
  • 10. Java  ME   Java  Me   Op)onal  Packages   Personal  Profile   Op)onal  Packages   Mobile  Informa)on  Device  Profile   Founda)on  Profile   (MIDP)   Connected  Device  Configura)on     Connected  Limited  Device   (CLC)   Configura)on  (CLDC)   JVM   KVM  
  • 11. Kilo  Virtual  Machine   •  KVM  is  similar  to  JVM,  runs  apps  wrifen  in   Java  –  language   •  KVM  is  used  in  cell  phones,  where  JVM  is  used   on  computers   •  Op)mized  for  small  size   •  More  info:  KVM  White  Paper  
  • 12. Java  ME   Java  Me   Op)onal  Packages   Personal  Profile   Op)onal  Packages   Mobile  Informa)on  Device  Profile   Founda)on  Profile   (MIDP)   Connected  Device  Configura>on     Connected  Limited  Device   (CLC)   Configura>on  (CLDC)   JVM   KVM  
  • 13. Configura)ons:  CLDC   •  CLDC  (JSR  139)   –  Small  wireless  devices  with  intermiQent  network   connec)ons   –  Low  power  consump)on   –  Phones,  Pagers,  Bar  code  scanners..   •  CDC  (JSR  36)   –  Larger  Devices  with  a  robust  network  connec)on   –  Set  top  boxes,  Internet  appliances  
  • 14. CDC  -­‐  CLDC   smaller   larger   Pagers                    Mobile  Phones                      PDAs                        Car  Naviga)on  Systems                      Internet  appliances                        Set-­‐top  Boxes   Connected  Limited  Device  Configura>on   Connected  Device  Configura>on     (CLDC)   (CDC)  
  • 15. CLDC  Func)onality   •  Subset  of  Java  language     •  Subset  of  core  Java  SE  libraries   •  Provides  basic  input  and  output   •  Provides  basic  networking  support   •  Security  
  • 16. CLDC  Libraries   •  CLDC  has  37  common  classes  from  Java  SE   –  java.lang:  Boolean,  Byte,  Integer,  Long,  String…   –  java.u>l:  Calendar,  Date,  Enumera)on,   Hashtable..   –  java.io:  InputStream,  OutputStream…   •  CLDC  1.0  does  not  have  floa)ng  point  support   •  CLDC  1.1  supports  floa)ng  point  
  • 17. Java  ME   Java  Me   Op)onal  Packages   Personal  Profile   Op)onal  Packages   Mobile  Informa>on  Device  Profile   Founda)on  Profile   (MIDP)   Connected  Device  Configura)on     Connected  Limited  Device   (CLC)   Configura)on  (CLDC)   JVM   KVM  
  • 18. The  Mobile  Informa)on  Device  Profile   (MIDP)   •  Specifica)on  for  wireless  devices   •  Provides  general  Java  libraries  for  developing   apps  for  wireless  devices   •  Versions:  MIDP  1.0  (JSR  37)  and  MIDP  2.x  (JSR   118)   •  MIDP  3.0  (JSR  271)  under  development   •  Great  amount  of  devices  that  support  MIDP  
  • 19. MIDP  Differences   •  MIDP  1.0   –  Limited  graphics  and  sound   –  Only  HTTP,  no  Sockets   •  MIDP  2.X   –  Game  API   –  Network  and  Mul)media  support   •  MIDP  3.0   –  Background  MIDlets,  Improved  UI,  Localisa)on..  
  • 20. MIDP  Sooware  Components   Device  Specific   MIDP  Java  App     Java  App     Op)onal  Java   Op)onal  Device   Packages   Specific  Packages   Na)ve  Applica)on   MIDP   CLDC   Device  Opera)ng  System  
  • 21. Example:  Nokia  N97   Device  Specific   MIDP  Java  App     Java  App     Op)onal  Java   Nokia  UI  API   Packages   Na)ve  Symbian  App   MIDP  2.1   CLDC  1.1   Symbian  OS  v9.3  
  • 22. MIDP  Func)onality   •  Applica)on  Life  Cycle  Management   •  User  Interface   •  Network  Connec)vity   •  Game  support  
  • 23. Java  ME   Java  Me   Op)onal  Packages   Personal  Profile   Op>onal  Packages   Mobile  Informa)on  Device  Profile   Founda)on  Profile   (MIDP)   Connected  Device  Configura)on     Connected  Limited  Device   (CLC)   Configura)on  (CLDC)   JVM   KVM  
  • 24. Op)onal  Packages,  JSRs   •  File  Connec)on  and  PIM   •  Content  Handler  API   •  Bluetooth   •  SVG  1.0   •  Wireless  Messaging  API  (WMA)   •  Payment  API   •  Mobile  Media  API  (MMAPI)   •  Advanced  Mul)media   •  Web  Services   Supplements  (AMMS)   •  Security  and  Trust  Services   •  Mobile  Interna)onaliza)on  API   •  Loca)on  API   •  Java  Bindings  for  the  OpenGL  ES   •  SIP  API   API   •  Mobile  3D  Graphics   •  Mobile  Service  Architecture   •  Mobile  Sensor  API   •  Java  Technology  for  the  Wireless   Industry  (JTWI)   •  SVG  2.0   •  Wireless  Messaging  2.0  (WMA)  
  • 25. Problems   •  Different  screen  sizes   •  Bugs  in  phones   •  Performance   •  Fragmenta)on,  JSRs    
  • 28. How  to  Build  MIDlets?   •  MIDlet  =  MIDP  Applica)on   •  If  Java  SE  is  familiar,  MIDlet  development  is   easy   •  Part  of  the  API  works  exactly  like  Java  SE   •  Building  process  is  different  
  • 29. Building  Process   1.  Compile   2.  Preverify   3.  Compress   4.  Create  JAD-­‐file   5.  Upload  to  client  
  • 30. 1.  Compile   •  Compile  a  MIDlet:   –  javac –bootclasspath midpclasses MyApp.java! •  Use  now  base  classes  from  Java  ME!   •  Aoer  the  compile,  one  must  preverify  the   result  
  • 31. 2.  Preverify   •  It  is  cheched  in  the  preverifing  process  that  your   MIDlet  does  not  harm  the  client-­‐machine.   •  In  Java  SE  this  checking  is  done  by  JVM.  KVM   does  not  have  this  kind  of  security  checking!   •  Security  checking  is  done  in  two  parts   –  Preverify  before  sending  MIDlet  to  the  client  machine   –  Client  machines  own  check   •  Command  line:   –  preverify –classpath .; midp classes –d . Midlet!
  • 32. 3.  Compress   •  Aoer  the  MIDlet  is  compiled  and  preverified,   you  must  compress  all  the  classes  (and   resources)  into  one  jar-­‐file.   •  Jar-­‐file  contains  also  MANIFEST.MF  -­‐  file,   which  describes  the  contents  of  the  jar-­‐file.     •  Compressing  with  the  jar-­‐tool:   –  jar cvmf manifest.mf MIDlet.jar MIDlet.class!
  • 33. Example  of  Manifest  file   MIDlet-1: MyMIDlet, MyMIDlet.png, MyMIDlet! MIDlet-Name: MyMIDlet! MIDlet-Vendor: Jussi Pohjolainen! MIDlet-Version: 1.0! MicroEdition-Configuration: CLDC-1.1! MicroEdition-Profile: MIDP-2.1!
  • 34. 4.  Create  JAD  -­‐  file   •  Java  Applica)on  Descriptor  file  describes  the   contents  of  MIDlet.   •  Together,  .jad  and  .jar  are  called  MIDlet  Suite   •  JAD-­‐file  is  used  so  that  the  client  machine  can   have  informa)on  about  the  sooware  before   installing  it.  
  • 35. Example  of  JAD-­‐file   MIDlet-1: MyMIDlet, MyMIDlet.png, MyMIDlet! MIDlet-Jar-Size: 1056! MIDlet-Jar-URL: MyMIDlet.jar! MIDlet-Name: MyMIDlet! MIDlet-Vendor: Unknown! MIDlet-Version: 1.0! MicroEdition-Configuration: CLDC-1.1! MicroEdition-Profile: MIDP-2.1!
  • 36. Distribu)on   Preverified  classes   Mobile   Resource  files   jar   Jar-­‐file   Phone   Manifest  file   Jad-­‐file