×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    18

    cannot create class in system package

    Hello,

    I recently encountered this problem on 6110. I'm using MMAPI classes, but only if I successfully detect MMAPI on runtime, by testing system properties ("video.snapshot.encodings" and "microedition.media.version").

    I tried it on several s60 phones and on 3120, works ok. But on 6110 it throws a "cannot create class in system package" error even though the code will never execute. I suspect I will encouter this on other phones as well.

    Is there a workaround to this problem? Note that this is not a problem of runtime detection of optional packages; This is a problem of having an optional package class appear SOMEWHERE in the code, on the phone which does not support it.

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: cannot create class in system package

    Hi Chandra,

    It can be due to that u may be using some other api which is not supported by 6110. this api may have been supported in 3120. So please check all the apis u r using in ur application.

    Wang

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

    Re: cannot create class in system package

    Hi DrChandra,

    Are you sure you're talking about Nokia 6110? AFAIK it doesn't even support JME, so it won't support MMAPI as well. I cannot figure out how you deployed MIDlets on it...

    Nokia 6110 - http://europe.nokia.com/nokia/0,8764,3277,00.html

    Are you talking about Nokia 6111 instead of 6110?

    BR,

    Juarez Junior

  4. #4
    Registered User
    Join Date
    Jun 2004
    Posts
    18

    Re: cannot create class in system package

    Quote Originally Posted by wang_shui
    Hi Chandra,

    It can be due to that u may be using some other api which is not supported by 6110. this api may have been supported in 3120. So please check all the apis u r using in ur application.

    Wang
    Hi Wang,

    I'm only using MMAPI optional package. I'm quite sure it's the cause of my problem, because when I comment out the call to api specific classes, the midlet works. (Even though the call would never happen in the first place).

  5. #5
    Registered User
    Join Date
    Jun 2004
    Posts
    18

    Re: cannot create class in system package

    Quote Originally Posted by juarezjunior
    Hi DrChandra,

    Are you sure you're talking about Nokia 6110? AFAIK it doesn't even support JME, so it won't support MMAPI as well. I cannot figure out how you deployed MIDlets on it...

    Nokia 6110 - http://europe.nokia.com/nokia/0,8764,3277,00.html

    Are you talking about Nokia 6111 instead of 6110?

    BR,

    Juarez Junior
    Hi Juarez,

    You're right - it's not the 6110, it's 6610. It was a typo. Thanks for pointing it out

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    There are some MIDP 1.0 devices from Nokia out there which use a wrong compiled Sun MIDP environment – never got fixed. When you are using JSRs conditionally, have a look at chapter 8.1 of the (forth-coming) JSR-248. It gives you good guidance, how to do this the right way. Good reading material anyway, as it contains a lot of knowledge about MIDP of today.

    However, I am not sure if it fixes your case. Faced similar, however, I can not recall, if a appropriate strategy solved it.

  7. #7
    Registered User
    Join Date
    Jun 2004
    Posts
    18

    Re: cannot create class in system package

    Traud,

    Yes, the strategy worked! The midlet loads successfully now on 6610.
    Many thanks! It's a great reading material.

    Cheers

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

    Re: cannot create class in system package

    Hi DrChandra,

    Could you please clarify how you solved your problem? Thanks!

    BR,

    Juarez Junior
    Last edited by juarezjunior; 2006-05-29 at 21:02.

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Have a look at that JSR-248 chapter 8.1. It is quite precise and contains an example, too.

  10. #10
    Registered User
    Join Date
    Jun 2004
    Posts
    18

    Re: cannot create class in system package

    As outlined in chapter 8.1 of JSR-248, I had to isolate the references to non-present APIs from the main body of the application. It is done by providing the interface to the class which is referencing the missing API. That class is instantiated using Class.forName() and Class.newInstance(). The application, after checking system properties to determine the existence of the API, references only the defined interface.

    It is all explained in the JSR 248 with an example.

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

    Re: cannot create class in system package

    Ok Traud and DrChandra,

    Thanks a lot! I'll read the spec as required...

    BR,

    Juarez Junior

Similar Threads

  1. How to Create New Class in CW ?
    By kning in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-08-13, 06:54
  2. How to create package in j2me suite
    By rmks in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2004-11-22, 21:12
  3. "Cannot create class in system package" on 6610
    By LanguageBug in forum Mobile Java General
    Replies: 7
    Last Post: 2003-11-02, 18:47
  4. How can I create a mbm file with CFbsBitmap class?
    By fernandola in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-02-26, 02:52
  5. How create a package for 6310i emulator
    By D021895 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2002-07-10, 12:41

Posting Permissions

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