Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The security exception you get says it all.</p> <p>J2ME applications do NOT behave like J2SE applications.</p> <p>You don't start them in the same way and you don't terminate them in the same way.</p> <p>In your case, the kind of J2ME application you are trying to write is called a MIDlet.</p> <p>A MIDlet lifecycle is regulated by the MIDP runtime that runs on top of a Java Virtual Machine that simply executes Java bytecode and handles system resources.</p> <p>When a MIDlet starts, the MIDP runtime calls the MIDlet constructor and its <code>javax.microedition.midlet.MIDlet.startApp()</code> override.</p> <p>In order to terminate a MIDlet, the MIDP runtime calls the <code>javax.microedition.midlet.MIDlet.destroyApp()</code> override.</p> <p>When the MIDlet decides that it can be terminated, it can call its own <code>destroyApp()</code> instead of waiting for the MIDP runtime to do it.</p> <p>In order to tell the MIDP runtime that it can be safely terminated, a MIDlet MUST call <code>javax.microedition.midlet.MIDlet.notifyDestroyed()</code>, typically as the last method call in <code>destroyApp()</code></p> <p>I suggest reading the <a href="http://www.jcp.org/en/jsr/detail?id=118" rel="nofollow noreferrer">MIDP specifications</a> in order to understand all the lifecycle and runtime issues.</p> <p>The latest <a href="http://java.sun.com/javame/downloads/sdk30.jsp" rel="nofollow noreferrer">JavaME SDK</a> also contains many properly constructed MIDlets for your inspiration.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload