jQuery in Action, 3rd edition
The moose likes Java Micro Edition and the fly likes destroy a midlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "destroy a midlet?" Watch "destroy a midlet?" New topic

destroy a midlet?

kumar mdu
Ranch Hand

Joined: Jan 04, 2011
Posts: 59

How to destroy a midlet from a form not by extending midlet..?

I used code like this by Extending form

In midlet

Error i'm getting is

at com.testcommand.TheFormScreen.commandAction(+12)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+186)
at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)

I know its simple but i'm not able to destroy the midlet

help me to solve this
kumar mdu
Ranch Hand

Joined: Jan 04, 2011
Posts: 59
no one
Darryl Burke

Joined: May 03, 2008
Posts: 5115

You need to pass a reference to the MIDlet to the Form's constructor, assign it to an instance field, and call exitMIDlet() on that reference.

Just declaring a MIDlet variable named mailMIDlet doesn't automagically assign the variable to the desired reference.

luck, db
There are no new questions, but there may be new answers.
kumar mdu
Ranch Hand

Joined: Jan 04, 2011
Posts: 59
thanks for your reply

I tried what you said

In MIDlet

In form 'TheEditPosition' constructor

I got this error.

Generic/midp2: at de.enough.polish.sample.TheEditPosition.commandAction(+12)
Unable to translate stacktrace: Unable to start the "jad"-decompiler: [java.io.IOException: Cannot run program "jad.exe": CreateProcess error=2, The system cannot find the file specified]. jad is available from http://www.kpdus.com/jad.html.

what i made wrong?

help me to solve this
I agree. Here's the link: http://aspose.com/file-tools
subject: destroy a midlet?
It's not a secret anymore!