Communication between MIDlets within the MIDlet suite.

Hi Friends,
I'm using WTK 2.2. I'm planning to have two MIDlets within the same MIDlet suite.
I had two MIDlet files but after creating the Jar package , In the display screen, Only one MIDlet is displayed for launching.
Please guide me the steps. If there is a local variable int i; then, how I do check the value of the variable between the different MIDlets?
Please guide me on the steps .
Thanks,
Ravi.

Here's the source code:
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;
public class A extends MIDlet
     public int i=10;
     public A()
     protected void startApp()
     protected void pauseApp()
     protected void destroyApp(boolean unconditional)
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;
public class B extends MIDlet
     public B()
     protected void startApp()
          A a=new A();
          a.i=10;
          System.out.println(a.i); //throws SecurityException at this line.
     protected void pauseApp()
     protected void destroyApp(boolean unconditional)
}

Similar Messages

  • Calling another midlets mehtod within the same suite

    i hope this is the right board...
    hi all,
    i have a midlet suite containing two midlets and i want to call methods from one midlet within the other midlet. its more than just sharing data (for that i already use the recordstore) so i really must call the method.
    how can i do this?
    simply creating a new instance or calling a static method didn't work here...
    tia
    mmkl

    hi,
    i'am also not so familiar with the pushregistry, but i already tried different samples...
    as far as i know (and tested) the midlet that later is responsible for 'listen' to incomming connections must register itself (or beeing registered in the jad-file, but static registrations is not able to react on already used ports).
    the fact why i'm using two midlets is because my application must connect itself to a servlet and this must be done in a thread seperated from the commandlistener thread. another issue is, that an incoming connection starts the midlet automaticaly.
    my application is primary designed for blackberry's and there the incomming connection forces the midlets display to be shown on the desktop, because of that i need a single midlet for the ui and one for the incomming and outgoing connections without an ui.
    ok, this is the application background, now back to the exception ;)
    i debuged the application as far as possible and the exception occures at
    ListenAndStore listenAndStore = new ListenAndStore();and with stepwise debuging this creation of the second midlet calls
    javax.microedition.lcdui.Displayand within this class, at line 2000 i guess, the exception is raised. i don't konw why this class iss called becaus my second midlet extens only midlet an implements no interface.
    i read somwhere, that every midlet has his own display, but i don't read or know why this should be a security problem :(
    mmkl

  • Communication between thread in the same process using file interface.

    Hi,
    I am developing  driver and i need to communicate between two thread.
    >can anyone guide me on implementing communication between two thread in the same process using File Interface. First thread will be driver and second will be application.I need to send IOCTL like commands using File interface ie is WriteFile(),ReadFile()
    from Host process to driver through file-interface(which run's in driver context).Host process should not be blocked for the duration of the driver to process the command.
    >File-interface will run in driver context and it will be responsible to receive command from application and pass it to the driver.
    what are the complexity introduced?
    >Can anyone also give me the link/reference to get more information on this topic?
    >How to replace IOCTL command's for instance baud _rate change command with a file interface for example with IRP.

    Here  is the detailed query:
    Hardware Abstraction Layer will interact with Driver(Both will be running in complete different process) .there is a IOCTL for command and  File interface for read and write.
    My requirement is:
    Both should run in the same process so HAL will run as one thread and driver as another thread in the same process .I don't want HAL to wait for completion of request and also i don't want driver to be blocked .
    We are planning to use a File Interface for communication between Hardware abstraction layer and Driver
    HAL will send the command or read/write operation to a file interface and driver will get the command or read/write request from the File interface
    There is a flexibility to change Hardware Abstraction layer and also the Driver
    Is it possible to use IOCTL between two thread under same process? if not what other options do we have.
    Can we use File interface to  send command (like IOCTL) between two thread?

  • Cannot update contacts from within the pc suite

    so, i've installed the latest version of pc suite but that didn't work, i've deleted it and run the pc suite cleaner, deleted the sms app from the phone and reinstalled everything. i can sync with outlook (set to sync in one way from phone to outlook) without a problem but i want to add extra info to the contacts in the phone. i have clicked on the contacts icon in the pc suite and all my (old)contacts are listed, when i click update, i get the update window appear with the blue and green dots but it just runs for ages before another window opens and says:Warnings
    The following warnings were produced during the synchronisation:
    The Synchronisation has been Terminated!
    PC Sync information.
    The Synchronisation has been Terminated! PC Sync could not update the data to the mobile phone.
    PC Sync information. PC Sync was not able to send data to the mobile phone.so whats up here then? everything else seems ok? any ideas?Cheers
    Rich
    Nexu 5

    I have no answer, just to say that I have had this problem for some time. I will dispose of my 9300 as soon as I have found a way out and go to a Msoft Mobile platform.
    Club Nokia deny that there is a problem with the Software and sy that I should return the 'phone. Of course my retailer does not provide an equivalent 'phone so that is no good (as I run my business from my 'phone).
    It may take a number of weeks (indeterminate) for Nokia to update the software on the phone. (Most Nokia service centres are unable to do this so by some wierd process I pack the phone and arrange at my expense to send it to their central service organisation. Whatever happend to the customer here?)
    It's clear from a trawl of the internet that this is a serious problem, as a long time Communicator user (since the first 9000) I am very disappointed with Nokia's lack of support on this problem and would suggest that you don't waste your time trying to solve it.

  • Moving photos between rolls within the same library

    I'm sure this question has been answered along the way in discussions, but I couldn't find it, so I'll post this. In iPhoto 6, within the same library, how does one move photos from one roll to another? I imported a couple of pictures which created unique rolls for each picture. I want to move these pictures to an existing roll, and delete the created rolls. I'm sure the answer is simple, but I can't figure it out!

    In the View Menu, check to enable Film Rolls
    Then drag the pic to the header of the actual roll.
    Regards
    TD

  • Communication between midlets

    i want two midlets communicating with each other -
    actually what i want is a cellphone sending a query to a server which sends some results back. right now i am doing on the emulator -
    what i want is one emulator senda a message to another emulator and vice versa
    Can you help me this?
    also what would be the easiest way to send an sms from a pc?

    Midlet communication:
    http://forum.java.sun.com/thread.jspa?threadID=676136&messageID=3948856
    and also
    http://forum.java.sun.com/thread.jspa?threadID=168514&messageID=677780
    For sending SMS from a PC:
    http://forum.java.sun.com/thread.jspa?threadID=359492&tstart=0
    and many many other if you search the web or this forum for them.
    Mihai

  • How to establish communication between webapplications on the j2ee

    Hello,
    we have two applications on the j2ee.
    Is there any possibility to exchange informations that are saved in the session between those two applications?
    Can you use the session id of one application to access the session data from the second app?
    Thanks and best regards,
    Jens

    Hello Jens,
    There are many ways to communicate between two J2EE applications. It depends on what you are trying to achieve. Johathan has mentioned already web service. Two other options recommended by sun are JCA (used mainly for synchronous invocations of EIS) and JMS (used for asynchronous invocations and loose coupling between your two applications). 
    Here is a link that perhaps can be useful to you :
    http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/eis-tier/eis-tier4.html
    Since both JMS and JCA are part of the J2EE specification, they are available and come with the WebAS server. There are many tutorials and examples on the net as well.
    Best Regards
    Peter

  • Communication between UME on the Java Stack and ABAP Stack

    Please look for the thread
    Unable to log on to IR, ID, SLD....
    before going any further. This thread follows.
    The prob in brief is that,
    On XI homepage, I am not able to get into anything after I entered the user name and pw.
    I have some roles SAP_XI_ADMINISTRATOR for my user. I have checked in SU01 on ABAP Stack.
    I thought that the error could be that the UME on the Java Stack is not able to communicate with the ABAP stack.
    Any direction on this would really help me.
    Regards,
    -Naveen.

    Can any one help me in this.
    -Naveen.

  • Failed to communicate between MIDlet and Servlet

    hi all
    i got a trouble here hope someone can get me out of this.... i've run example from a website even from Sun itself which demo the communication between MIDlet and Servlet.... but below is what i got:
    "*Application not authorized to access the restricted API*"
    the source code from: http://didiksoft.wordpress.com/
    im using tomcat webserver 4.1.3.... jsdk 5.0.... Sun JWT 2.5..... is there something that i missed to configure..??? thanks in advance....

    I have the same problem in XP. I installed the whole Oracle9i product on my desktop and after a day or two the message began appearing on my machine. I couldnt use any of the tools. I tried uninstallinmg according to Oracles instruction and after installing again had the same problem.
    I logged a TAR and they advised me to reinstall but according to Oracles instructions for removing the software first.
    Will keep you posted

  • Accessing RMS of a different Midlet Suite

    Hi,
    I read the following in a document released from Nokia on MIDP 2.0.
    "MIDlets are allowed to create multiple record stores, as long as they have different names, and MIDlets
    can access record stores relating to other MIDlets within the same suite. Also, if explicit permission is
    given, MIDlets within other suites can also access the record store (a new feature in MIDP 2.0)."
    I would like to access an RMS in another MIDlet suite from my midlet. Does anybody know how I would do this or where I could find more information on this?? Also what does it mean when it says "explicit permission".
    My motivation behind this question is that I would like to maintain the data on my application even if a new version of the application is released. I take it that is I release a new version of my application that I would have to install a new midlet suite and that this would overwrite the existing RMS in the MIDlet suite. Therefore by having my RMS in a seperate MIDlet suite I can maintain my data. Is all of this correct?? Would this be the best way to approach this problem??
    Thanks,
    Brian

    Hi,
    Thanks for both of your replies!! i have tested this and found it to be sucessful making my task a lot easier. :-)
    Anyhow my other question regarding this is - on phones that ask you if you want the user data to persist.. is it possible to ensure that the user data is always saved.. thus removing this prompt or is this prompt standard on the device and cannot be changed.
    Thanks,
    Brian

  • It takes like more than a day to copy folders of total 30gb from my external hard drive to my macbook pro. And same is to transfer from one destination to another within the macbook. i bought it on november 2012 it was fast then. don't know what happen?

    i am having problem copying any files or folders from any external device or moving between folders within the macbook. its too slow and takes a load of time. as you can see above picture it makes all clear.
    its not even old i just bought it on november 2012. it worked fine 2-3 weeks but now it not good. even apps take more time to open. it is getting too slow so soon. anyone with solutions ? please help me.

    What kind of external device is it? USB 2 is the slowest port on the Mac, Firewire 800 and eSATA and Gigabit Ethernet are much faster, USB 3 and Thunderbolt are extremely fast.
    Also, if the hard drive is almost full things can slow down.

  • Short dump Error during VM container communication between ABAP and JAVA.

    Hello All,
    Can anybody please help with resolving the following issue:
    Short dump is displayed, when I try to insert CRM product (type: material) in the document (opportunity). This CRM product was created in CRM directly.
    When I try to insert ECC migrated material, everything works fine.
    Here is the details of dump:
    Short text
        Error during VM container communication between ABAP and JAVA
    Information on where terminated
        Termination occurred in the ABAP program "SAPLPRC_INT" - in "GET_PRICING_PROCEDURE_INFO".
        The main program was "SAPMHTTP ". In the source code you have the termination point in line 100 of the (Include) program "LPRC_INTF35".
    Thank you!

    hi Willie,
         this is the dump, and i have used the t-code sm52 . the VMC is not active.
    |Short Text                                                                                        |
    |    Error during VM Container communication between ABAP and JAVA.                                |
    |What happened?                                                                                    |
    |    The current program had to be terminated because of an                                        |
    |    error when installing the R/3 System.                                                         |
    |    Error in the RFC layer.                                                                       |
    |What can you do?                                                                                  |
    |    Note which actions and entries caused the error to occur.                                     |
    |                                                                                                  |
    |    Consult your SAP administrator.                                                               |
    |                                                                                                  |
    |    Using transaction ST22 for ABAP dump analysis, you can view, manage,                          |
    |    and retain termination messages for longer periods.                                           |
    |Error analysis                                                                                    |
    |    An error has occurred in the RFC layer during communication between                           |
    |    JAVA and the ABAP stack. This prevents data from being passed correctly                       |
    |    between the two stacks.                                                                       |
    |                                                                                                  |
    |    Message    = TH_VMC_SERV_NOT_ACTIVE                                                           |
    |    Return code = -1007                                                                           |
    |    Pointer    = "000007DD348F6138"                                                               |
    |How to correct the error                                                                          |
    |    Check whether the VMC is active on your application server. To do this,                       |
    |    run transaction SM52. If the VMC is not active, contact your SAP                              |
    |    administrator.                                                                                |
    Regards
    Charles

  • Is it possible to use List Type in XML schema within the SOA Rule author?

    Is it possible to use List Type in XML schema within the SOA Suite Rule author? The reason is that with the following XSD, Rule author generates XML facts of type "List" for the element "ResultSet". Basically I want to check the Input facts (Input1, Input2, Input3) for some conditions and then assign action to the element Resultset of type List (array). The output Resultset can contain multiple values based on the input facts. My problem is that I am unable to see the ResultSet in the "Assign" action type of the action block. Is it possible to use the Resultset of type List with the Rule author or is there any limitation on the rule author and any workaround for this?
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/ns/TestMultipleOutputs"
    elementFormDefault="qualified">
    <element name="TestMultipleOutputs">
    <complexType>
    <sequence minOccurs="0">
    <element name="Input1" type="string" minOccurs="0"/>
    <element name="Input2" type="string" minOccurs="0"/>
    <element name="Input3" type="string" minOccurs="0"/>
    <element name="ResultSet" type="string" minOccurs="0"
    maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    --Thanks a lot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Richard,
    I have slightly modified the xml schema you suggested and was able to import into the rule author. the following is the modified XSD. Rule Author created a List type for the "ResultSet" . I still don't see "Resultset" in the assign action, so I tried creating RL function in order to assign the output to the "Resultset", but was unsuccessful so far. can you please let me know how to populate the resultset with the output values? Thanks a lot.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema attributeFormDefault="unqualified"
    xmlns:ns1="http://www.oracle.com/ns/TestComplexOutputs"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oracle.com/ns/TestComplexOutputs"
    xmlns:tns="http://www.oracle.com/ns/TestComplexOutputs"
    elementFormDefault="qualified">
    <xsd:element name="TestComplexOutputs">
    <xsd:complexType>
    <xsd:sequence minOccurs="0">
    <xsd:element name="Input1" type="xsd:string" minOccurs="0"/>
    <xsd:element name="Input2" type="xsd:string" minOccurs="0"/>
    <xsd:element name="Input3" type="xsd:string" minOccurs="0"/>
    <xsd:element name="ResultSet" type="tns:ResultSetType" minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="ResultSetType">
    <xsd:sequence>
    <xsd:element name="ResultSet" type="tns:ResultSetStructure" minOccurs="1"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ResultSetStructure">
    <xsd:sequence>
    <xsd:element name="ErrorReason">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

  • Is it possible to reuse views between components of the same project ?

    Hello All,
      Does anyone knows if its possible to re-use views/viewsets which maybe common between components within the same project ? I am trying to use back common views where possible so that it will be easier to maintain the application should there be changes in the future. Having identical views across the components will mean that there is a need to maintain muliples views when updating/amending. Any help or suggestion will be greatly appreciated. Thank you.
    from
    Kwok Wei

    Thank you very much Bharathwaj. I am not very keen in using JDI (lack of usage knowledge + current project to small to use JDI + insufficient time) and hence I guess I will need to continue to look around for another solution.
    Any experts who may have more suggestions kindly put then up here please. Thank you.
    from
    Kwok Wei

  • MM STO between Plants under the same company code

    Hi experts,
    Please guide on the configuration steps for doing STO between Plants unders the same company code.
    We have company code 100 in that Plants A B & C are theie. Each Plant can do STO to other Plant.
    How to configure this scenario?

    Dear,
    Please follow bellow path
    1. Create a vendor for the Company code of the receiving plant using account group 0007 via T-Code XK01.
    2. In the purchasing data view assign the supplying plant and the schema group
    3. Create customer with the sales area of the vendor.
    4. The shipping conditions, the delivering plant and the transportation zone determine the route in the STO.
    5. In the pricing procedure determination relevant to the STO assign document pricing procedure and customer pricing procedure to get the pricing in the invoice.
    6. Maintain condition records for pricing condition.
    7. Maintain carrier as a partner in the customer master.
    8. In OMGN select the supplying plant and assign the company code and sales area. Similarly select the receiving plant and assign the company code and sales area (The company code to which the plant is assigned to).
    9. Assign the delivery type and checking rule to the document type.
    10. And finally, assign the purchasing document type to the supplying plant and the receiving plant.
    11. Create the STO using T-Code ME 21N and save.
    12. Check for release strategy if any and release using T-Code ME 28.
    13. Create delivery in background using VL10G.
    14. If delivery is created, it is an indication of correct configuration and master data creation.
    Stock transfer between two plants in different company codes is known as inter company stock transfer.
    Material should be maintained in both supplying and receiving plant MM01
    Stock should maintain only in supplying plant MB1C
    Create receiving plant as a customer in supplying plants company code and sales area XD01
    Assign this customer number in receiving plant details OMGN
    Assign supplying sales area in supplying plant details OMGN
    Assign delivery type NB for in combination of supplying/ receiving plants.
    Create STO ME21N
    As it is normal there in the item details we should get shipping date i.e. customer number
    Go for Delivery VL10B
    Shipping point *****
    Select PO go for execute
    then select the delivery then go for delvy ............create delvy,,,, delvy number generated.
    Goods Issue VL02
    Delvy doc **********
    Click on picking
    enter the picking qty
    Click on PGI
    in the mean time check in the PO history you will get the details
    Goods receipt MIGO
    Stock transfers that include deliveries and billing documents/invoices are only possible between plants belonging to different company codes.
    If you want to carry out a cross-company-code stock transport order with delivery but without a billing document, you must set the Relevant for Billing (data element FKREL) indicator in Customizing of the item type to "blank" (Not relevant for billing).
    The following applications are involved in this type of stock transfer:
    ? Purchasing (MM-PUR) in entering the order
    ? Shipping (LE-SHP) in making the delivery from the issuing plant
    ? Billing (SD-BIL) in creating the billing document for the delivery
    ? Inventory Management (MM-IM) at goods receipt in the receiving plant
    Invoice Verification (MM-IV) at invoice receipt in the receiving
    Transfer of goods from one location to another location, it may be between plants within the same company code or in different company code's plants.
    within the company code, but plants,
    receiving plant will raise the STO in Supplying/issuing plant-ME21n,
    Supplying plant will deliver the goods to receiving plants ,
    then we need to pick n post the Goods Issue-VL02n,
    now when we can observe that the STO qty will be added into receiving plant and reduced in Delivering plant,
    To do this, we need do prior customization in SPRO-IMG,-
    material should be created in both plants( receiving & Supplying)
    -maintain the stock only in supplying plant
    -create a dummy customer in supplying plant's sales area(if u have one sales area, create in tat comp code n sales area)
    -assign this customer number to receiving plant's details along with the sales area,
    -Assign the STO doc type(UB) to Supplying plant, along with checking rule
    -Assign the Del type (NL/NLCC) to Supplying n receiving plant.
    Stock Transport Order:
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b911d43ad11d189410000e829fbbd/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b917843ad11d189410000e829fbbd/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b918543ad11d189410000e829fbbd/content.htm
    u can also use the SAP building block
    with delivery
    http://help.sap.com/bestpractices/BBLibrary/html/P36_IntStockTransDel_EN_IN.htm
    without delivery
    http://help.sap.com/bestpractices/BBLibrary/html/P38_IntStockTransWithoutDel_EN_IN.htm
    Regards,
    Mahesh Wagh

Maybe you are looking for