Advertisement Jump to content


This topic is now archived and is closed to further replies.


How can I terminate my Midlet?

This topic is 5489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Stupid question, but one I''m struggling with. I have a main class (start) which extends MIDLET. It is not runnable. It instantiates a runnable class (running) and runs it in a thread. My question is this: A lot of my UI is controlled from the running thread. I need to exit the Midlet, but start the exit from the thread. What is the proper way of doing this? My thoughts so far have been to pass a reference of the Midlet to the thread, but I thought there might be a nicer way. Thanks, Will

Share this post

Link to post
Share on other sites
Hi Will,

I use a function in My MIDlet class

public void exit()
System.out.println( "exit function" );

Then i call this function from my Menu Class

Dont know of any other ways!
Maybe somebody will have a another way of doing it!


Share this post

Link to post
Share on other sites
Thanks for the responses.

PipoDe: You are correct, but I wanted a way to kill the midlet via software, from another thread.

Woody: Thanks.. I guess I have no choice but to pass that reference after all. BTW: How''s your game comming along? I''m almost done-- just the highscore list, help, and a title screen left. Everything else is in it''s final state. I''d like to send you another copy for testing.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!