Groups > Symbian > Symbian EPOC Java > Re: Integrating two MIDlets




Integrating two MIDlets

Integrating two MIDlets
Wed, 9 Nov 2005 13:13:18 +0530
hi folks,
        In my application im integrating one example EMIDlet which contains 
13 java classes, with my own MYMIDlet which contains 19 java classes.Because 
i want the whole functionality of that EMIDlet for my application. But  i 
got ClassCastException or Duplicate class error if i copy ,paste those 
classes of EMIDlet  to MYMIDlet.
For acquiring the functionality another MIDlet to our MIDlet if  thr are any 
specific methods  Plzzz  suggest me .

Thanks in Advance.
Regards
yafy.



Post Reply
Re: Integrating two MIDlets
Fri, 11 Nov 2005 10:59:44 -000
Not sure if I fully understand you question.

At runtime a MIDlet suite can only access (non-system) classes that are
packaged in its own JAR file. So if at runtime MIDletA wants to access
utilities from MIDletB then MIDletA and MIDletB must be delivered in the
same MIDlet suite (and therefore JAR file).

At build time the simplest solution is to build all the utility classes into
the MIDlets JAR file. But obviously you can't have name clashes, that is
have two different classes in the same package with the same name.

Regards
Martin

"yafy" <yafy@inv.com> wrote in message
news:SOQ5dCQ5FHA.1736@extapps30...
> hi folks,
>         In my application im integrating one example EMIDlet which
contains
> 13 java classes, with my own MYMIDlet which contains 19 java
classes.Because
> i want the whole functionality of that EMIDlet for my application. But  i
> got ClassCastException or Duplicate class error if i copy ,paste those
> classes of EMIDlet  to MYMIDlet.
> For acquiring the functionality another MIDlet to our MIDlet if  thr are
any
> specific methods  Plzzz  suggest me .
>
> Thanks in Advance.
> Regards
> yafy.
>
>
>
>

Post Reply
Re: Integrating two MIDlets
Sat, 12 Nov 2005 07:58:04 +053
yes Martin ,i ve done what u said here.That is both MIDlets are inside same 
MIDlet Suite only.also im sure ,no two classes r with same name.I put the 
those classes in separate packges.Now its building succesfully.But at 
runtime NullpointerExp is thrown.

prevoiusly ,before integrating EMIDet and MYMIDlet ,both were entending 
MIDlet class .But after integration ,since thr should be only one class 
which extends MIDlet, i ve changed the EMIDlet to a class.Do u think 
anything wrong with this?

Coz NullPointerExcption is thrown here.

Display.getDisplay(myp).setCurrent(clientForm);

myp           - from MYMIDlet's classes
clientForm  - from EMIDlet's classes

ideas are appriciated...


Thanks
Regards,
yafy


"Martin" <martin@dummy.address> wrote in message 
news:VF9Ef5q5FHA.2968@extapps30...
> Not sure if I fully understand you question.
>
> At runtime a MIDlet suite can only access (non-system) classes that are
> packaged in its own JAR file. So if at runtime MIDletA wants to access
> utilities from MIDletB then MIDletA and MIDletB must be delivered in the
> same MIDlet suite (and therefore JAR file).
>
> At build time the simplest solution is to build all the utility classes 
> into
> the MIDlets JAR file. But obviously you can't have name clashes, that is
> have two different classes in the same package with the same name.
>
> Regards
> Martin
>
> "yafy" <yafy@inv.com> wrote in message
news:SOQ5dCQ5FHA.1736@extapps30...
>> hi folks,
>>         In my application im integrating one example EMIDlet which
> contains
>> 13 java classes, with my own MYMIDlet which contains 19 java
> classes.Because
>> i want the whole functionality of that EMIDlet for my application. But 
i
>> got ClassCastException or Duplicate class error if i copy ,paste those
>> classes of EMIDlet  to MYMIDlet.
>> For acquiring the functionality another MIDlet to our MIDlet if  thr
are
> any
>> specific methods  Plzzz  suggest me .
>>
>> Thanks in Advance.
>> Regards
>> yafy.
>>
>>
>>
>>
>
> 

Post Reply
about | contact