Header
Home | Sitemap  
Sections
Archive
Su Mo Tu We Th Fr Sa
1
2345678
9101112131415
16171819202122
23242526272829
30
Syndication



Exiting a MIDlet

by

image

 

Exiting a MIDlet

The CLDC Specification states that a call to the method java.lang.System.exit is effectively equivalent to calling the method Runtime.getRuntime().exit. This means that in a CLDC program, calling the System.exit method will exit the virtual machine. However, since MIDP defines its own application model, this behavior is not desirable. For instance, it is not desirable that a single MIDlet in a MIDlet suite, upon exiting, would shut down the entire virtual machine (and therefore shut down the other MIDlets as well.) Rather, a well-behaved MIDlet should exit by calling the destroyApp and notifyDestroyed methods.

In order to prevent MIDP applications from accidentally shutting down the entire virtual machine, the MIDP Specification redefines the behavior of the system.exit method. In MIDP, calling this method will always throw a java.lang.SecurityException.

225 times read

Related news

» The MIDlet State Model
by admin posted on Sep 26,2007
» MIDlets
by admin posted on Jul 07,2007
» Application Properties
by admin posted on Sep 26,2007
» Areas Covered by the MIDP Specification
by admin posted on Jul 07,2007
» MIDP Application Program Structure
by admin posted on Sep 26,2007


More Top News
Cisco Wireless Networking
Most Popular
Featured Author