SlideShare a Scribd company logo
CLDC
Connected, Limited Device Configuration




                  Cornelius Koo - 2005
CLDC Devices Characteristics
• 160 - 512 kb total memory available for
  java platform
• 16 bit / 32 bit processor
• low power consumption, often battery
  powered
• intermitten network connectivity (often
  wireless), limited bandwith
Hardware Requirements
• CLDC doesnt have specific hardware
  requirements
• Minimal memory requirements :
• 128 kb - for running the JVM and CLDC libraries.
  This memory must preserve its content, even
  when the device is powered off. (Nonvolatile
  memory)
• 32 kb - available during application runtime for
  allocation of objects. (Volatile memory / heap)
Software Requirements
• The Operating System must be able to
  running JVM and managing Java
  applications on the device including :
  Select and launch application
  Remove application
JVM Specification
       for
      CLDC
Java Language for CLDC
• CLDC doesn’t support floating point type.
  (double and float)
• CLDC doesn’t support finalize()
  method.
• CLDC only support limited set of
  Exception classes for error handling.
Java Virtual Machine for CLDC
• JVM doesn’t support floating point operation.
• JVM doesn’t support native interface and native
  method invocation.
• Reflection is not available.
• JVM must implement the classloader.
• finalize() method is not available.
• JVM doesn’t suport ThreadGroup class.
• JVM doesn’t support weak references.
Weak References
• Garbage collector recognizes that an
  object is being referenced, yet the object is
  still a candidate for garbage collection.
Security Handling
• Any devices running Java application will
  need protection from malicious codes that
  may access system information or
  resources.
• This “Low Level” protection is
  implemented through class file verification.
CLDC Class File Verification
• Class file verification is done in 2 steps in
  CLDC.
• 1st Step is pre-verification.
• 2nd Step is in-device verification.
Pre-Verification
• Pre-verification :
• A software program is run to insert additional
  attributes into the class file.
• Class file will be approximately 5% larger after
  pre-verification.
• Done as part of development process or before
  a class file is loaded on a device.

• A "Stack Maps" is added to the class file,
  describing what variables and operands are art
  of the interpreter stack space.
In-Device Verification
• In-Device verification :
• Once a device loads a pre-verified class file, the
  in-device verifier runs through each instruction.
• There are several checks done to validate the
  code.
• At any point the verifier can report and reject the
  class file.

• Code verifier program for KVM is in the range of
  10kb and less than 100 bytes of heap space
  required.
CLDC Package
Java Classes
System Classes
•   java.lang.Class
•   java.lang.Object
•   java.lang.Runnable
•   java.lang.Runtime
•   java.lang.String
•   java.lang.StringBuffer
•   java.lang.System
•   java.lang.Thread
•   java.lang.Throwable
Data Type Classes
•   java.lang.Boolean
•   java.lang.Byte
•   java.lang.Character
•   java.lang.Integer
•   java.lang.Long
•   java.lang.Short
Collection Classes
•   java.util.Enumeration
•   java.util.Hashtable
•   java.util.Stack
•   java.util.Vector
I/O Classes
•   java.io.ByteArrayInputStream
•   java.io.ByteArrayOutputStream
•   java.io.DataInput
•   java.io.DataInputStream
•   java.io.DataOutput
•   java.io.DataOutputStream
•   java.io.InputStream
•   java.io.InputStreamReader
•   java.io.OutputStream
•   java.io.OutputStreamWriter
•   java.io.PrintStream
•   java.io.Reader
•   java.io.Writer
Calendar and Time Classes
• java,util.Calendar
• java.util.Date
• java.util.TimeZone
Utility Classes
• java.util.Math
• java.util.Random
Exception Classes
•   java.io.EOFException
•   java.io.InterruptedIOException
•   java.io.IOException
•   java.io.UnsupportedEncodingException
•   java.io.UTFDataFormatException
•   java.lang.ArithmeticException
•   java.lang.ArrayIndexOutOfBoundsException
•   java.lang.ArrayStoreException
•   java.lang.ClassCastException
•   java.lang.ClassNotFoundException
•   java.lang.Exception
•   java.lang.IllegalAccessException
•   java.lang.IllegalArgumentException
Exception Classes
•   java.lang.IllegalMonitorStateException
•   java.lang.IllegalThreadStateException
•   java.lang.IndexOutOfBoundsException
•   java.lang.InstantiationException
•   java.lang.InterruptedException
•   java.lang.NegativeArraySizeException
•   java.lang.NullPointerException
•   java.lang.NumberFormatException
•   java.lang.RuntimeException
•   java.lang.SecurityException
•   java.lang.StringIndexOutOfBoundsException
•   java.util.EmptyStackException
•   java.util.NoSuchElementException
Error Classes
• java.lang.Error
• java.lang.OutOfMemoryError
• java.lang.VirtualMachineError
Internationalization
• java.io.InputStreamReader
• java.io.OutputStreamWriter

• both can be used to convert from bytes
  to/from unicode.
Reference
• Core J2ME Technology and MIDP. John
  W. Muchow. Prentice Hall PTR, 2002.
• Enterprise J2ME: Developing Mobile
  Java Applications. Michael Juntao Yuan.
  Prentice Hall PTR, 2003.
• J2ME in A Nutshell. Kim Topley. Oreilly,
  2002.
• Wireless J2ME Platform Programming.
  Vartan Piroumian. Prentice Hall, 2002.

More Related Content

PPTX
Byte code manipulation and instrumentalization in Java
PDF
Java programming and security
PPT
Java Virtual Machine
PDF
The Real Thing: Java Virtual Machine
PPTX
Jvm Architecture
PPTX
Java virtual machine
PPT
Java-java virtual machine
Byte code manipulation and instrumentalization in Java
Java programming and security
Java Virtual Machine
The Real Thing: Java Virtual Machine
Jvm Architecture
Java virtual machine
Java-java virtual machine

What's hot (20)

PDF
Java Virtual Machine - Internal Architecture
PPTX
White and Black Magic on the JVM
PPTX
QSpiders - Jdk Jvm Jre and Jit
PDF
What's Inside a JVM?
PPTX
Pj01 2-install java and write first java program
PPTX
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
PDF
QA / Testing Tools, Automation Testing, Online & Classroom Training
PPT
Java SE 7 New Features and Enhancements
PPT
JVM- Java Virtual Machine
PPTX
QSpiders - Memory (JVM architecture)
PPTX
BI, Integration, and Apps on Couchbase using Simba ODBC and JDBC
PPTX
Architecture diagram of jvm
PDF
Introduction To Core Java - SpringPeople
PDF
Java Online Training
PPTX
Inside the jvm
PPT
Why scala - executive overview
PDF
20140228 fp and_performance
PPTX
Alberto Paro - Hands on Scala.js
PDF
WALA Tutorial at PLDI 2010
Java Virtual Machine - Internal Architecture
White and Black Magic on the JVM
QSpiders - Jdk Jvm Jre and Jit
What's Inside a JVM?
Pj01 2-install java and write first java program
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
QA / Testing Tools, Automation Testing, Online & Classroom Training
Java SE 7 New Features and Enhancements
JVM- Java Virtual Machine
QSpiders - Memory (JVM architecture)
BI, Integration, and Apps on Couchbase using Simba ODBC and JDBC
Architecture diagram of jvm
Introduction To Core Java - SpringPeople
Java Online Training
Inside the jvm
Why scala - executive overview
20140228 fp and_performance
Alberto Paro - Hands on Scala.js
WALA Tutorial at PLDI 2010
Ad

Viewers also liked (9)

PDF
Strata G Capabilities
PDF
06 Eclipse ME
PPT
PDF
07 Midlet On The Web
PDF
05 J2ME Wtk Command Line
PDF
Basic JSTL
PDF
Expression Language in JSP
PDF
13 Low Level UI Event Handling
PDF
Strata G Capabilities
06 Eclipse ME
07 Midlet On The Web
05 J2ME Wtk Command Line
Basic JSTL
Expression Language in JSP
13 Low Level UI Event Handling
Ad

Similar to 02 cldc (20)

PPT
M app slides_1
PDF
Understanding the Dalvik Virtual Machine
PPT
Scmad Chapter02
PPT
PDF
Java Programming
PPTX
PDF
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
PPT
Introduction to Mobile Application Development
PPT
Mobile Java
PPTX
Java Programming and J2ME: The Basics
DOCX
FRAUD DETECTION IN ONLINE AUCTIONING
PDF
What`s new in Java 7
PDF
Understanding the Dalvik bytecode with the Dedexer tool
PDF
Real World Java Compatibility (Tim Ellison)
KEY
JavaOne 2011 - JVM Bytecode for Dummies
PPTX
Java and the JVM
PDF
Exciting Features and Enhancements in Java 23 and 24
PPTX
14.jun.2012
PPT
J2 me 1
PPT
Java security
M app slides_1
Understanding the Dalvik Virtual Machine
Scmad Chapter02
Java Programming
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Introduction to Mobile Application Development
Mobile Java
Java Programming and J2ME: The Basics
FRAUD DETECTION IN ONLINE AUCTIONING
What`s new in Java 7
Understanding the Dalvik bytecode with the Dedexer tool
Real World Java Compatibility (Tim Ellison)
JavaOne 2011 - JVM Bytecode for Dummies
Java and the JVM
Exciting Features and Enhancements in Java 23 and 24
14.jun.2012
J2 me 1
Java security

More from corneliuskoo (8)

PDF
Html Hands On
PDF
12 High Level UI Event Handling
PDF
09 Display
PDF
08 Midlet Basic
PDF
04 J2ME Wireless Tool Kit
PDF
03 midp
PDF
02a cldc property support
PDF
01 java 2 micro edition
Html Hands On
12 High Level UI Event Handling
09 Display
08 Midlet Basic
04 J2ME Wireless Tool Kit
03 midp
02a cldc property support
01 java 2 micro edition

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
STKI Israel Market Study 2025 version august
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
Programs and apps: productivity, graphics, security and other tools
Assigned Numbers - 2025 - Bluetooth® Document
observCloud-Native Containerability and monitoring.pptx
Hindi spoken digit analysis for native and non-native speakers
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A novel scalable deep ensemble learning framework for big data classification...
STKI Israel Market Study 2025 version august
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Web App vs Mobile App What Should You Build First.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Univ-Connecticut-ChatGPT-Presentaion.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
NewMind AI Weekly Chronicles - August'25-Week II
cloud_computing_Infrastucture_as_cloud_p
Enhancing emotion recognition model for a student engagement use case through...
Module 1.ppt Iot fundamentals and Architecture
Developing a website for English-speaking practice to English as a foreign la...
Programs and apps: productivity, graphics, security and other tools

02 cldc

  • 1. CLDC Connected, Limited Device Configuration Cornelius Koo - 2005
  • 2. CLDC Devices Characteristics • 160 - 512 kb total memory available for java platform • 16 bit / 32 bit processor • low power consumption, often battery powered • intermitten network connectivity (often wireless), limited bandwith
  • 3. Hardware Requirements • CLDC doesnt have specific hardware requirements • Minimal memory requirements : • 128 kb - for running the JVM and CLDC libraries. This memory must preserve its content, even when the device is powered off. (Nonvolatile memory) • 32 kb - available during application runtime for allocation of objects. (Volatile memory / heap)
  • 4. Software Requirements • The Operating System must be able to running JVM and managing Java applications on the device including : Select and launch application Remove application
  • 5. JVM Specification for CLDC
  • 6. Java Language for CLDC • CLDC doesn’t support floating point type. (double and float) • CLDC doesn’t support finalize() method. • CLDC only support limited set of Exception classes for error handling.
  • 7. Java Virtual Machine for CLDC • JVM doesn’t support floating point operation. • JVM doesn’t support native interface and native method invocation. • Reflection is not available. • JVM must implement the classloader. • finalize() method is not available. • JVM doesn’t suport ThreadGroup class. • JVM doesn’t support weak references.
  • 8. Weak References • Garbage collector recognizes that an object is being referenced, yet the object is still a candidate for garbage collection.
  • 9. Security Handling • Any devices running Java application will need protection from malicious codes that may access system information or resources. • This “Low Level” protection is implemented through class file verification.
  • 10. CLDC Class File Verification • Class file verification is done in 2 steps in CLDC. • 1st Step is pre-verification. • 2nd Step is in-device verification.
  • 11. Pre-Verification • Pre-verification : • A software program is run to insert additional attributes into the class file. • Class file will be approximately 5% larger after pre-verification. • Done as part of development process or before a class file is loaded on a device. • A "Stack Maps" is added to the class file, describing what variables and operands are art of the interpreter stack space.
  • 12. In-Device Verification • In-Device verification : • Once a device loads a pre-verified class file, the in-device verifier runs through each instruction. • There are several checks done to validate the code. • At any point the verifier can report and reject the class file. • Code verifier program for KVM is in the range of 10kb and less than 100 bytes of heap space required.
  • 15. System Classes • java.lang.Class • java.lang.Object • java.lang.Runnable • java.lang.Runtime • java.lang.String • java.lang.StringBuffer • java.lang.System • java.lang.Thread • java.lang.Throwable
  • 16. Data Type Classes • java.lang.Boolean • java.lang.Byte • java.lang.Character • java.lang.Integer • java.lang.Long • java.lang.Short
  • 17. Collection Classes • java.util.Enumeration • java.util.Hashtable • java.util.Stack • java.util.Vector
  • 18. I/O Classes • java.io.ByteArrayInputStream • java.io.ByteArrayOutputStream • java.io.DataInput • java.io.DataInputStream • java.io.DataOutput • java.io.DataOutputStream • java.io.InputStream • java.io.InputStreamReader • java.io.OutputStream • java.io.OutputStreamWriter • java.io.PrintStream • java.io.Reader • java.io.Writer
  • 19. Calendar and Time Classes • java,util.Calendar • java.util.Date • java.util.TimeZone
  • 21. Exception Classes • java.io.EOFException • java.io.InterruptedIOException • java.io.IOException • java.io.UnsupportedEncodingException • java.io.UTFDataFormatException • java.lang.ArithmeticException • java.lang.ArrayIndexOutOfBoundsException • java.lang.ArrayStoreException • java.lang.ClassCastException • java.lang.ClassNotFoundException • java.lang.Exception • java.lang.IllegalAccessException • java.lang.IllegalArgumentException
  • 22. Exception Classes • java.lang.IllegalMonitorStateException • java.lang.IllegalThreadStateException • java.lang.IndexOutOfBoundsException • java.lang.InstantiationException • java.lang.InterruptedException • java.lang.NegativeArraySizeException • java.lang.NullPointerException • java.lang.NumberFormatException • java.lang.RuntimeException • java.lang.SecurityException • java.lang.StringIndexOutOfBoundsException • java.util.EmptyStackException • java.util.NoSuchElementException
  • 23. Error Classes • java.lang.Error • java.lang.OutOfMemoryError • java.lang.VirtualMachineError
  • 24. Internationalization • java.io.InputStreamReader • java.io.OutputStreamWriter • both can be used to convert from bytes to/from unicode.
  • 25. Reference • Core J2ME Technology and MIDP. John W. Muchow. Prentice Hall PTR, 2002. • Enterprise J2ME: Developing Mobile Java Applications. Michael Juntao Yuan. Prentice Hall PTR, 2003. • J2ME in A Nutshell. Kim Topley. Oreilly, 2002. • Wireless J2ME Platform Programming. Vartan Piroumian. Prentice Hall, 2002.