Launching Midlets

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?

I am using Class launcher = Class.forName(<class>)

launcher.newInstance() but this does not seem to work.

thank you in advance

[315 byte] By [mdande] at [2007-9-26 11:15:42]
# 1

[mdande],

Can you post any error messages that is output on the J2ME emulator or actual device when you run the newInstance() code? This will give us some clues as to why you have not been succesful in running the second MIDlet class using the java.lang.Class methods.

Please reply ASAP.

Allen Lai

Developer Technical Support

SUN Microsystems

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

allenlai at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

It does nothing on an actual device (i85 and A008). On the simulator what it does is my applicaiton starts. I select one of the midlets I want to launch, I click the launch button then it goes back to the applicaiton manager. I then start my application again and instead of showing me the list of midlets, it goes directly to the midlet I launched previously.

Any help would be appreciated.

David

mdande at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Are you there?
mdande at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

[mdande],

Many apologies for the late reply, I am watching too many threads at the same time.

At the moment, I do not have the information for you on the proper way to launch another MIDlet from a MIDlet that is within the same MIDlet suite.

I will try to search for some internal information and post my answer here once I have it.

Stay tuned.

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

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

allenlai at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

[mdande],

After searching around for almost a month, I finally found the correct answer to your question here:

http://developer.java.sun.com/developer/qow/archive/113/index.html

In summary - the Class.forName() is not by default implemented in all KVM implementations and it depends on the vendor who implementations the Java Application Manager (JAM) to decide how MIDlets are launched within the same MIDlet suite.

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

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

allenlai at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6
Hi,I would like to know how can I contact Mr Allen Lai for JAVAMAIL API problem.Thanks for you replayJ-Y
jkay2 at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7
Post the problem under a seperate topic, as other would like to see the problem and solution. Allen is pretty good at answering topics in this forum.thanksDon
d1camero at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 8

[jkay2],

I will glad to assist you. Post your JavaMail question in the JavaMail forum area and I'll go there to look for your question. Furthermore, other JavaMail experts may throw in their assistance as well.

Allen Lai

Developer Technical Support

SUN Microsystems

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

allenlai at 2007-7-2 0:17:29 > top of Java-index,Java Mobility Forums,Java ME Technologies...