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

PPT
Introduction to j2me
PDF
08 Midlet Basic
PPTX
Introduction to Mobile programming(J2ME)
PPTX
Blackberry Development Environment
PPT
PPT
Mobile Application Development MAD J2ME
PPT
Mobile Application Development MAD J2ME UNIT 2
PPTX
J2ME mobile app development
Introduction to j2me
08 Midlet Basic
Introduction to Mobile programming(J2ME)
Blackberry Development Environment
Mobile Application Development MAD J2ME
Mobile Application Development MAD J2ME UNIT 2
J2ME mobile app development

What's hot (19)

PPS
J2ME Unit_01
PDF
Java2 MicroEdition-J2ME
PDF
A dynamic application using jboss
PDF
Building Enterprise Application with J2EE
PDF
Java Introduction
PPT
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
PPTX
J2 ee architecture
PPTX
Chapter2 j2ee
PDF
Ajava final(sachin sir9822506209)_vision_academy_21
PPT
Java J2EE
PPTX
Chapter 11:Understanding Client-Side Technologies
DOCX
Mobile application development
PDF
Introduction to Java EE (J2EE)
PPT
J2 ee architecture
PPTX
Chapter 10:Understanding Java Related Platforms and Integration Technologies
PPT
01 Symbianosbasics Introducao
PPTX
J2ee seminar
PDF
PPT
J2ME Unit_01
Java2 MicroEdition-J2ME
A dynamic application using jboss
Building Enterprise Application with J2EE
Java Introduction
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
J2 ee architecture
Chapter2 j2ee
Ajava final(sachin sir9822506209)_vision_academy_21
Java J2EE
Chapter 11:Understanding Client-Side Technologies
Mobile application development
Introduction to Java EE (J2EE)
J2 ee architecture
Chapter 10:Understanding Java Related Platforms and Integration Technologies
01 Symbianosbasics Introducao
J2ee seminar
Ad

Viewers also liked (9)

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

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

PPT
Introduction to Mobile Application Development
PDF
010118565.pdf
PPT
CIS 642 - Mobile Information Device profie
PDF
J2me Crash Course
PPT
Mobile Java
PDF
Javame sdk-datasheet-167819
PPTX
Introduction to mobile programing (J2ME)
PPTX
DOCX
Parallelogram by using j2 me j2me.shahid
PPT
Introduction to JAVA ME Mobile Application.ppt
PDF
J2me step by step
PPT
PPT
SynapseIndia mobile build apps management
PPTX
Java J2ME
PPT
MOBILE APPs DEVELOPMENT PLATFORMS
PPT
Android Seminar
PDF
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
PPT
A Taste of Java ME
PDF
Campus portal for wireless devices srs
Introduction to Mobile Application Development
010118565.pdf
CIS 642 - Mobile Information Device profie
J2me Crash Course
Mobile Java
Javame sdk-datasheet-167819
Introduction to mobile programing (J2ME)
Parallelogram by using j2 me j2me.shahid
Introduction to JAVA ME Mobile Application.ppt
J2me step by step
SynapseIndia mobile build apps management
Java J2ME
MOBILE APPs DEVELOPMENT PLATFORMS
Android Seminar
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
A Taste of Java ME
Campus portal for wireless devices srs

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Programs and apps: productivity, graphics, security and other tools
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx

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