launch a midlet from another midlet

I need to launch a midlet from another midlet that is running, is it posible and would it be?regards in advance
[132 byte] By [rpalomino] at [2007-9-26 7:54:45]
# 1

[rpalomino],

You are out of luck here. The current CLDC/MIDP specification permits one only MIDlet jar file to be run at a given point in time. You can package as many class files as you wish but only one MIDlet can be launched by the kVM.

If your purpose is to write MIDlet applications that access the same data resource, then instead of launching multiple MIDlets (which is not possible), you can use the RMS data store for persistent information across the different MIDlet class file application.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-1 18:08:54 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
thank you very much
rpalomino at 2007-7-1 18:08:54 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
If I have a midlet suite, could I have one midlet within the suite launch another midlet in the suite? If so, is there a reference on how to do this?thank you
mdande at 2007-7-1 18:08:54 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Yes, you can do this in the following way:

<code>

Class midletClass = Class.forName("LowLevelMIDlet");

LowLevelMIDlet midlet2 = (LowLevelMIDlet)midletClass.newinstance();

</code>

To leave the new midlet running its place, you'd have to finish it off with a notifyDestroyed method.

The thing is though that this isn't a lot of use as the new midlet will not be under the control of the device's application manager.

cknowles01 at 2007-7-1 18:08:54 > top of Java-index,Java Mobility Forums,Java ME Technologies...