Sun Java Solaris Communities My SDN Account Join SDN
 
FAQ

MIDlets Spawning MIDlets

 
 



Question

Can a MIDlet spawn or download another MIDlet?

Tip

There are two entities in the MIDP Specification: a MIDletSuite, and a MIDlet. A MIDletSuite is a collection of MIDlets and resources bundled together in a compressed JAR file (which, by the way, does not have to be kept after the MIDletSuite is "installed" on a device). MIDlets are the launchable entities within the suite.

For security reasons, it is assumed that MIDlets within a MIDletSuite are packaged together for a reason and should be able to interoperate. What's implied here is that the MIDlets share a name space; in other words, each MIDlet in the MidletSuite can "see" one another. Because they can see one another, they can launch one another (Class.forName metaphor).

In contrast, one MIDletSuite cannot launch another MIDletSuite. That's because they do not share name spaces. Since the CLDC+MIDP does not have a security manager (too big and complex for small devices), the MIDP expert group felt it more prudent to limit the interaction of downloaded applications to those that are packaged together by the provider.

The MIDP specification does not explicitly cover how a MIDlet launches another MIDlet. So it's up to the vendor of the pertinent code (such as an MIDP-conforming browser) to determine how MIDlets are launched and whether or not MIDlets can launch other MIDlets. This means that to be truly portable, an application shouldn't depend on this capability.

Launching a MIDletSuite is solely the responsibility of the Application Management Software, that is, Java Application Management (JAM).

More Information

Acknowledgments

Many thanks to KVM-INTEREST list contributors Mark VandenBrink and Eric Giguere for contributing to this answer.

.
. . .
. Note: If you have a question to which you need an answer, try the Mobility Forums. You can read through the existing topics or register for your free Sun Developer Network membership and post new messages or threads. For more information, go to the Why Register page. .
.
.

Back To Top