SlideShare a Scribd company logo
Java MEFafadia TechPrasanjitDeyprasanjit@fafadia-tech.com
IntroductionJ2ME or Java ME is a java platform designed for mobile phones and embedded systems Java ME is a replacement for a similar technology known as Personal JavaJava ME is basically divided into two configurationsConnected Limited Device ConfigurationConnected Device Configuration
Connected Limited Device ConfigurationThe  CLDC or Connected Limited Device Configuration contains a strict subset of the Java-class libraries, and is the minimum amount needed for a JVM to operate.A configuration provides the most basic set of libraries and virtual-machine features that must be present in each implementation of a J2ME environment.When coupled with one or more profiles, the Connected Limited Device Configuration gives developers a solid Java platform for creating applications for consumers and embedded devices.CLDC has got many profiles of which MIDP is the most widely used oneCLDC is used with devices having limited memory and processor
Connected Device ConfigurationCDC or Connected Device Configuration is a subset of Java SE, containing almost all the libraries that are not GUI relatedIt is richer than CLDCIt has got 3 profiles namely Foundation profile , Personal basis profile and Personal profileCDC profile is used for devices with more memory and processor speedCDC is used in high-end PDA’s, smart phones and set-top boxes
ProfilesA profile complements a configuration by adding additional classes that provide features appropriate to a particular type of device or to a specific vertical market segmentProfiles are layered on top of the configurationBoth Java ME configurations have one or more associated profilesMIDP or Mobile Information Device Profile is the most widely used profile under CLDC
MIDPMIDP or Mobile Information Device Profile complements the CLDC by adding networking, user interface components, and local storageThis profile is primarily aimed at the limited display and storage facilities of mobile phones, and it therefore provides a relatively simple user interface and basic networking based on HTTP 1.1. MIDP is the best known of the J2ME profiles because it is the basis for Wireless JavaMIDP provides some important API’s under CLDC such as javax.microedition.midlet, javax.microedition.lcdui, javax.microedition.rms
Midlets and emulatorJava ME is a platform designed for small devices with low memory and processor speedAn application made using MID profile is called a midletMidlets can be run on any platform which has a JVM installedMidlets needs an emulator to run themAn emulator is an application that run a midlet on the desktopSun’s Wireless Toolkit and EclipseME provides an emulator that are used for running a midletA group of midlets is called a midlet suite
Midlet life cycleThere are three possible states in a midlet’s life cyclepaused – The midlet instance is created and is inactiveactive – The midlet is activedestroyed – The midlet is terminated and is ready for reclamation by the garbage collectorWhen the midlet is created in response to a user request, it is in paused state. At some point later, the midlet is activated and again later can go back to the paused state and finally terminates due to the user request
A simple midletimport javax.microedition.midlet.*;class simple entendsMIDLet {	public simple() { // constructor	}	public void startApp() {	// some code	}	public void pauseApp() {	}	public void destroyApp(boolean destroy) {	}}
A tour of CLDC/MIDPPackages:javax.microedition.midlet.*;	 javax.microedition.io.*;javax.microedition.lcdui.*;javax.microedition.rms.*;User Interface widgets:	Form, TextField, List, TextBox, DateField, Image, Gauge, Alert, Canvas, Graphics, DisplayEvent Handling classes: 	Command and Command ListenerHigh level UI : Form, TextBox, etc. Low level UI : Canvas, Graphics
User Interface with MIDPThe javax,microedition,lcdui.*; includes several classes for displaying the interface to the screen
Sample code using UIimport javax.microedition.midlet.*;import javax.microedition.lcdui.*; // for using user interface widgetsclass UIdemo extends MIDlet  implements CommandListener {	Form form;	Display display; // helps in displaying the form	Command back,save; // commands	public UIdemo() {		form = new Form(“Sample code”);		display = Display.getDisplay(this);		back = new Command(“Back”,Command.BACK,1);		save = new Command(“Save”,Command.OK,1);form.addCommand(back);form.addCommand(save);display.setCurrent(form);form.setCommandListener(this);	}	public void startApp() {}	public void pauseApp() {}	public void destroyApp(boolean destroy) {} public void commandAction(Command c, Displayable d) { // handler for the user actions	if(c==back)	destroyApp(true);	else	form.append(“Hello”);}}
Persistent storageRecord Management System or rms helps in storing records locally on the deviceIt stores records in binary formatIt stores data persistently and data can be retrieved later even after the device has been switched offRecords are stored in the Record StoresSeveral methods in record store are:openRecordStore()closeRecordStore()deleteRecordStore()getRecord()Enumeraterecord() and so on
Connection typesAll the important classes and methods for connecting the to the wireless network are included in the javax.microedition.io.* packageThe connections types are provided by the InputStream and the OutputStream interfacesThese interfaces adds the ability to input and output data over the networkThere are three important level of connections available SocketDatagramHTTP connection
Thank you

More Related Content

What's hot (19)

PPS
J2ME Unit_01
Prashanth Shivakumar
 
PDF
Java2 MicroEdition-J2ME
Rohan Chandane
 
PDF
A dynamic application using jboss
ijcax
 
PDF
Building Enterprise Application with J2EE
Calance
 
PDF
Java Introduction
Middleware Training
 
PPT
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Pallepati Vasavi
 
PPTX
J2 ee architecture
Krishna Mer
 
PPTX
Chapter2 j2ee
Jafar Nesargi
 
PDF
Ajava final(sachin sir9822506209)_vision_academy_21
SachinZurange
 
PPT
Java J2EE
Sandeep Rawat
 
PPTX
Chapter 11:Understanding Client-Side Technologies
It Academy
 
DOCX
Mobile application development
Govardhan Gottigalla
 
PDF
Introduction to Java EE (J2EE)
Atit Patumvan
 
PPT
J2 ee architecture
saurabhshertukde
 
PPTX
Chapter 10:Understanding Java Related Platforms and Integration Technologies
It Academy
 
PPT
01 Symbianosbasics Introducao
Tiago Romão
 
PPTX
J2ee seminar
Sahil Kukreja
 
PDF
J2EE day 1
Biswabrata Banerjee
 
PPT
J2ee
Prince Soni
 
J2ME Unit_01
Prashanth Shivakumar
 
Java2 MicroEdition-J2ME
Rohan Chandane
 
A dynamic application using jboss
ijcax
 
Building Enterprise Application with J2EE
Calance
 
Java Introduction
Middleware Training
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
Pallepati Vasavi
 
J2 ee architecture
Krishna Mer
 
Chapter2 j2ee
Jafar Nesargi
 
Ajava final(sachin sir9822506209)_vision_academy_21
SachinZurange
 
Java J2EE
Sandeep Rawat
 
Chapter 11:Understanding Client-Side Technologies
It Academy
 
Mobile application development
Govardhan Gottigalla
 
Introduction to Java EE (J2EE)
Atit Patumvan
 
J2 ee architecture
saurabhshertukde
 
Chapter 10:Understanding Java Related Platforms and Integration Technologies
It Academy
 
01 Symbianosbasics Introducao
Tiago Romão
 
J2ee seminar
Sahil Kukreja
 

Viewers also liked (9)

PPT
Session2-J2ME development-environment
muthusvm
 
PPT
Java ME CLDC MIDP
SMIJava
 
PDF
MIDP GUI Development: Alert, List, Form, TextBox
Jussi Pohjolainen
 
PPT
Session 3 J2ME Mobile Information Device Profile(MIDP) API
muthusvm
 
PDF
J2ME GUI Programming
Rohan Chandane
 
PDF
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
Vando Batista
 
PPTX
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)
Fafadia Tech
 
DOC
It6611 mobile application development laboratory l t p c0 0 3 2
MNM Jain Engineering College
 
DOCX
Cs 6611 mad lab manual
balasubramani manickam
 
Session2-J2ME development-environment
muthusvm
 
Java ME CLDC MIDP
SMIJava
 
MIDP GUI Development: Alert, List, Form, TextBox
Jussi Pohjolainen
 
Session 3 J2ME Mobile Information Device Profile(MIDP) API
muthusvm
 
J2ME GUI Programming
Rohan Chandane
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
Vando Batista
 
J2ME Lwuit, Storage & Connections (Ft Prasanjit Dey)
Fafadia Tech
 
It6611 mobile application development laboratory l t p c0 0 3 2
MNM Jain Engineering College
 
Cs 6611 mad lab manual
balasubramani manickam
 
Ad

Similar to Introduction To J2ME(FT - Prasanjit Dey) (20)

PPT
Introduction to Mobile Application Development
Senthil Kanth
 
PDF
010118565.pdf
EidTahir
 
PPT
CIS 642 - Mobile Information Device profie
AbdurehmanDawud
 
PDF
J2me Crash Course
guest860a03
 
PPT
Mobile Java
Nikita Makarov
 
PDF
Javame sdk-datasheet-167819
Oscar Eduardo
 
PPTX
Introduction to mobile programing (J2ME)
Wambua Wambua
 
PPTX
J2ME
Kushal Modi
 
DOCX
Parallelogram by using j2 me j2me.shahid
Shahid Riaz
 
PPT
Introduction to JAVA ME Mobile Application.ppt
AbdurehmanDawud
 
PDF
J2me step by step
Yogesh Bindwal
 
PPT
J2me
Geetu Khanna
 
PPT
SynapseIndia mobile build apps management
Synapseindiappsdevelopment
 
PPTX
Java J2ME
marada0033
 
PPT
MOBILE APPs DEVELOPMENT PLATFORMS
Senthil Kanth
 
PPT
Android Seminar
Ganesh Waghmare
 
PDF
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
PPT
A Taste of Java ME
wiradikusuma
 
PDF
Campus portal for wireless devices srs
Anand Goyal
 
Introduction to Mobile Application Development
Senthil Kanth
 
010118565.pdf
EidTahir
 
CIS 642 - Mobile Information Device profie
AbdurehmanDawud
 
J2me Crash Course
guest860a03
 
Mobile Java
Nikita Makarov
 
Javame sdk-datasheet-167819
Oscar Eduardo
 
Introduction to mobile programing (J2ME)
Wambua Wambua
 
Parallelogram by using j2 me j2me.shahid
Shahid Riaz
 
Introduction to JAVA ME Mobile Application.ppt
AbdurehmanDawud
 
J2me step by step
Yogesh Bindwal
 
SynapseIndia mobile build apps management
Synapseindiappsdevelopment
 
Java J2ME
marada0033
 
MOBILE APPs DEVELOPMENT PLATFORMS
Senthil Kanth
 
Android Seminar
Ganesh Waghmare
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
A Taste of Java ME
wiradikusuma
 
Campus portal for wireless devices srs
Anand Goyal
 
Ad

Recently uploaded (20)

PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
July Patch Tuesday
Ivanti
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Biography of Daniel Podor.pdf
Daniel Podor
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 

Introduction To J2ME(FT - Prasanjit Dey)

  • 2. IntroductionJ2ME or Java ME is a java platform designed for mobile phones and embedded systems Java ME is a replacement for a similar technology known as Personal JavaJava ME is basically divided into two configurationsConnected Limited Device ConfigurationConnected Device Configuration
  • 3. Connected Limited Device ConfigurationThe CLDC or Connected Limited Device Configuration contains a strict subset of the Java-class libraries, and is the minimum amount needed for a JVM to operate.A configuration provides the most basic set of libraries and virtual-machine features that must be present in each implementation of a J2ME environment.When coupled with one or more profiles, the Connected Limited Device Configuration gives developers a solid Java platform for creating applications for consumers and embedded devices.CLDC has got many profiles of which MIDP is the most widely used oneCLDC is used with devices having limited memory and processor
  • 4. Connected Device ConfigurationCDC or Connected Device Configuration is a subset of Java SE, containing almost all the libraries that are not GUI relatedIt is richer than CLDCIt has got 3 profiles namely Foundation profile , Personal basis profile and Personal profileCDC profile is used for devices with more memory and processor speedCDC is used in high-end PDA’s, smart phones and set-top boxes
  • 5. ProfilesA profile complements a configuration by adding additional classes that provide features appropriate to a particular type of device or to a specific vertical market segmentProfiles are layered on top of the configurationBoth Java ME configurations have one or more associated profilesMIDP or Mobile Information Device Profile is the most widely used profile under CLDC
  • 6. MIDPMIDP or Mobile Information Device Profile complements the CLDC by adding networking, user interface components, and local storageThis profile is primarily aimed at the limited display and storage facilities of mobile phones, and it therefore provides a relatively simple user interface and basic networking based on HTTP 1.1. MIDP is the best known of the J2ME profiles because it is the basis for Wireless JavaMIDP provides some important API’s under CLDC such as javax.microedition.midlet, javax.microedition.lcdui, javax.microedition.rms
  • 7. Midlets and emulatorJava ME is a platform designed for small devices with low memory and processor speedAn application made using MID profile is called a midletMidlets can be run on any platform which has a JVM installedMidlets needs an emulator to run themAn emulator is an application that run a midlet on the desktopSun’s Wireless Toolkit and EclipseME provides an emulator that are used for running a midletA group of midlets is called a midlet suite
  • 8. Midlet life cycleThere are three possible states in a midlet’s life cyclepaused – The midlet instance is created and is inactiveactive – The midlet is activedestroyed – The midlet is terminated and is ready for reclamation by the garbage collectorWhen the midlet is created in response to a user request, it is in paused state. At some point later, the midlet is activated and again later can go back to the paused state and finally terminates due to the user request
  • 9. A simple midletimport javax.microedition.midlet.*;class simple entendsMIDLet { public simple() { // constructor } public void startApp() { // some code } public void pauseApp() { } public void destroyApp(boolean destroy) { }}
  • 10. A tour of CLDC/MIDPPackages:javax.microedition.midlet.*; javax.microedition.io.*;javax.microedition.lcdui.*;javax.microedition.rms.*;User Interface widgets: Form, TextField, List, TextBox, DateField, Image, Gauge, Alert, Canvas, Graphics, DisplayEvent Handling classes: Command and Command ListenerHigh level UI : Form, TextBox, etc. Low level UI : Canvas, Graphics
  • 11. User Interface with MIDPThe javax,microedition,lcdui.*; includes several classes for displaying the interface to the screen
  • 12. Sample code using UIimport javax.microedition.midlet.*;import javax.microedition.lcdui.*; // for using user interface widgetsclass UIdemo extends MIDlet implements CommandListener { Form form; Display display; // helps in displaying the form Command back,save; // commands public UIdemo() { form = new Form(“Sample code”); display = Display.getDisplay(this); back = new Command(“Back”,Command.BACK,1); save = new Command(“Save”,Command.OK,1);form.addCommand(back);form.addCommand(save);display.setCurrent(form);form.setCommandListener(this); } public void startApp() {} public void pauseApp() {} public void destroyApp(boolean destroy) {} public void commandAction(Command c, Displayable d) { // handler for the user actions if(c==back) destroyApp(true); else form.append(“Hello”);}}
  • 13. Persistent storageRecord Management System or rms helps in storing records locally on the deviceIt stores records in binary formatIt stores data persistently and data can be retrieved later even after the device has been switched offRecords are stored in the Record StoresSeveral methods in record store are:openRecordStore()closeRecordStore()deleteRecordStore()getRecord()Enumeraterecord() and so on
  • 14. Connection typesAll the important classes and methods for connecting the to the wireless network are included in the javax.microedition.io.* packageThe connections types are provided by the InputStream and the OutputStream interfacesThese interfaces adds the ability to input and output data over the networkThere are three important level of connections available SocketDatagramHTTP connection