



























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Detail Summery about Introduction to Java ME (Java Platform, Micro Edition), Overview of Java ME, Java ME configurations and profiles , Connected Device Configuration, Mobile Information Device Profile, Pause for breath.
Typology: Study notes
1 / 35
This page cannot be seen from the preview
Don't miss anything!




























1 Application Development for Mobile Devices
Contents Overview of Java ME configurations profiles alphabet soup! Building MIDlets tools using Java ME Wireless Toolkit using NetBeans hello world MIDlet what's the temperature in Sydney?
Java ME
Connected Limited Device Configuration
Connected Device Configuration Information Module Foundation Profile Personal Basis Profile Personal Profile
Mobile Information Device Profile
Typical target device characteristics 2.5MB ROM 2MB RAM 32 bit processor network connection Device types set-top boxes high-end PDAs Very smart phones JVM is the same specification as the one used with Java SE Current version is 1.
Markus A. Wolf
Minimum device characteristics At least 8KB memory for persistent data screen of at least 96 x 54 pixels Input capability e.g. keypad keyboard screen 2 way network connection – probably intermittent Current versions MIDP 1.0 and MIDP 2. 7 MIDP 2.0 contains enhancements, such as multimedia support, HTTPS connection, etc.
Pause for breath It's all quite confusing - an “alphabet soup” + lots of version numbers Suppose you have been asked by your employer to develop software to run on the range of mobile devices used by their enterprise why might you consider Java ME? where would you look to find information about what Java ME configurations and profiles are appropriate?
Help ... it's all too MSA confusing! JVM JTWI CDLC CDC profiles configurations MIDP API It is confusing because of
Contents Overview of Java ME configurations profiles alphabet soup! Building MIDlets tools using J2ME Wireless Toolkit using NetBeans hello world MIDlet what's the temperature in Sydney?
MIDlet development tools Lots available including: Sun's MIDP reference implementation command line and fiddly Sun Java Wireless Toolkit for CLDC (JWTK) a simple GUI built on top of the reference implementation NetBeans + Mobility Pack Borland JBuilder Mobile Studio IBM WebSphere Studio Device Developer etc Integrated Development Environments (IDEs)
Markus A. Wolf
create a project using the JWTK write the code in EditPlus test using JWTK emulator compile and pre-verify using JWTK 14
Write the code in EditPlus (1) package hw; import javax.microedition.midlet.; import javax.microedition.lcdui.; public class HelloWorld extends MIDlet implements CommandListener { private Display mDisplay; private Form mForm; private StringItem mMessage; private Command mExitCommand; public HelloWorld() { mForm = new Form("Hello World MIDlet"); mMessage = new StringItem("message: ", "Hello World"); mForm.append(mMessage); mExitCommand = new Command("Exit", Command.EXIT, 0); mForm.addCommand(mExitCommand); mForm.setCommandListener(this); } HelloWorld.java - code continued on next slide you don't need to understand all the code that this stage
Write the code in EditPlus (2) public void startApp() { mDisplay = Display.getDisplay(this); mDisplay.setCurrent(mForm); } public void commandAction(Command c, Displayable s) { if (c == mExitCommand) { destroyApp(false); notifyDestroyed(); } } public void pauseApp() {} public void destroyApp(boolean unconditional) {} } // end of class HelloWorld
Again - couldn't be easier - just click the Run button
Same again with NetBeans write the code test using emulator "Build" the MIDlet create a MIDLet in NetBeans