×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    22

    MIDlet Suite security

    I want to launch the main application MIDlet from a launcher MIDlet to ùake a spash screen, but I get a security exception:
    ____________________________
    java.lang.SecurityException
    - com.symbian.midp.runtime.MIDletExecutor.midletConstructorHook(), bci=35
    - javax.microedition.midlet.MIDlet.<init>(), bci=11
    - moboffline.nokia.Mobitec.<init>(), bci=1
    - moboffline.nokia.MobStarter.startApp(), bci=17
    - javax.microedition.midlet.MIDletInvoker.invokeStartApp(), bci=1
    - com.symbian.midp.runtime.MIDletScheduler.startMIDlet(), bci=26
    - com.symbian.midp.runtime.MIDletScheduler.run(), bci=14
    _____________________________

    I thought that a MIDlet suite was free to share resources ...
    But apparently Threaded resources are not included ?!
    Thx

  2. #2
    Nokia Developer Expert
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    220

    Re: MIDlet Suite security

    Please try and post your questions in the correct forum... this will benifit you as more people will view your posting. I have moved this posting to Mobile Java -> General

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: MIDlet Suite security

    Hi guimel,

    How are you debugging this app? Please send us the complete stack trace, code and a more descriptive scenario so that anyone can try to help you effectively. Also please detail your app's architecture if possible.

    BR

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    22

    Re: MIDlet Suite security

    MIDlet1 is the launcher with the progress bar
    MIDlet2 is the app MIDlet I want to launch

    MIDlet1:
    ________
    void startApp() {
    mid2= new MIDlet2();
    mid2.startApp();
    destroyApp();
    }
    ________

    so now my MIDlet2 app should run
    but I get the error (see previous message)
    Thx

  5. #5
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    249

    Re: MIDlet Suite security

    Afaik, you cannot start another midlet using a midlet in that way. Only the OS can invoke that.

    There is a workaround. You can have your 2nd midlet listening to a port, and send a message to that port with the first midlet and it should start up the 2nd midlet.

    However, that's ALOT of work just to create a splash screen. You don't need a whole midlet just to add a splash screen. Just set it up in the midlet itself, and when your variables/classes/RMS records/whatever you are doing is all loaded, you can display whatever else you need to.

    You can use an alert or Canvas or form for it.

    Here's one example:
    http://java.sun.com/developer/J2METe...01/tt0820.html

  6. #6
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: MIDlet Suite security

    Hi guimel,

    lmtang is right, these lifecycle methods are called by the AMS/JAM and you should not call them directly. Note:

    "The MIDlet life cycle is managed by the AMS as a state machine, with three defined states: paused, active, and destroyed. The AMS transitions the MIDlet to each state by invoking the life cycle methods pauseApp(), startApp(), and destroyApp(), respectively."

    So, just change your implementation/strategy and probably you won't have problems with this exception anymore.

    BR

Similar Threads

  1. RegisterAlarm starts Suite instead of MIDlet
    By johnbutler in forum Mobile Java General
    Replies: 0
    Last Post: 2005-11-04, 18:20
  2. 'Response Unknown' when downloading midlet
    By Weevil in forum Mobile Java General
    Replies: 3
    Last Post: 2004-05-30, 17:01
  3. Accessing RMS of a different Midlet Suite
    By brianpegan in forum Mobile Java General
    Replies: 1
    Last Post: 2003-12-10, 16:11
  4. Midlet suite problem..Help me, please..
    By etamburini in forum Mobile Java General
    Replies: 1
    Last Post: 2003-06-05, 12:41
  5. loading ressources using nokia midlet suite
    By b_varasse in forum Mobile Java General
    Replies: 0
    Last Post: 2002-05-16, 11:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×