Programatically controlling objects in another VM

I need to programatically get and modify objects in another VM.
How can I do this? I already use JDI, but until now I only get references, not the real things.
And I am not sure, if JDI allows me to modify objects in another VM, invoke methods etc.
But it must work somehow, because all this is possible when debugging in an IDE like in Eclipse. But its too hard to understand all their large implementation.
Are there any small code pieces which simply show me exactly how I can access objects in another VM (no references) and modify them inside the other VM from another VM?
Until now I have something like this:
Class clazz = Class.forName("com.sun.tools.jdi.SocketTransportService");
TransportService ts = (TransportService) clazz.newInstance();
Connection connection = ts.attach("localhost:8000", 0, 0);
VirtualMachineManager vmm = Bootstrap.virtualMachineManager();
VirtualMachine vm = vmm.createVirtualMachine(connection);
List allThreads = vm.allThreads();
The elements in the collection are actuall of type ThreadReferenceImpl. I already discovered that I need to suspend the thread and walk the stack trace in order to get the object I want and then to resume the thread (but I found only references). Thats the basic idea. I wonder if that works, and if yes, how. Please no guesses.

Check out the jdb source code in <jdk>/demo/jpda/examples.jar. You can find calls to ObjectReference.setValue(value) and invokeMethod(...).

Similar Messages

  • Add Tags to Document tool put one object behind another or just deletes page content?

    Using Acrobat XI Pro to make documents 508 compliant PDF. I've had a number of issues went using Add Tags to document option, it’s put one object behind another or deleting it all together. Also had issues when trying to adjust the reading order, content is moved or deleted. This PDF is created from InDesing CS5
    Anybody know what I'm talking about or have any ideas about how to fix it? Thank

    Content should not ever be deleted by adding tags, but it may appear so since - as you note - objects may go into hiding behind other objects. In theory you can bring them out of hiding by rearrange things in the Order pane, but I have much better luck using the Content pane - it provides a much finer level of control. If text is hidden behind a shaded box, for example, I will move the box above the text in the Content order, then usually convert the box to an artifact if it is not one already.
    Hope this helps.
    a 'C' student

  • Unable to open 10g Database Control Webpage from another computer

    Unable to open 10g Database Control Webpage from another computer
    Hi Gurus
    I have just installed Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on my PC Windows XP , created database and configured DB control
    I can open Database Control Webpage on the database machine by typing
    http://USI2374993VND0.vlgdw2k.visteon.com:1158/em
    or
    http://136.18.70.189:1158/em
    But can not open it from another PC
    When I do following from another PC
    1. http://USI2374993VND0.vlgdw2k.visteon.com:1158/em
    Get error: [code=DNS_NO_DATA] The IP address was not found during the DNS lookup. Contact your system administrator.
    2. http://136.18.70.189:1158/em
    Get error:Can not display web page
    I can ping 136.18.70.189 but not USI2374993VND0.vlgdw2k.visteon.com
    On the other PC I also tried adding 136.18.70.189 to
    tools - internet options - security - local internet - sites - advanced - add this web
    site to the zone as http://136.18.70.189
    But it did not work
    Please help with any ideas
    Thanks a bunch
    New DBA

    Firewalls?
    DNS translation issues?

  • Can i copy values from one object to another ?

    One more help..
    How do i compare the input values with the ones in an object of another class ?
    Can i copy values of one object of a class to different object of another class ?
    Thanks,
    Sanlearns

    How do i compare the input values with the ones in an
    object of another class ?By getting and comparing them?
    Can i copy values of one object of a class to
    different object of another class ?Yes, you can. But you shouldn't, as you're breaking encapsulation all over the place. You could use setter methods (if available) to set the values.

  • Copy a group of cost centers from one controlling area to another

    Hello,
    is it possible to copy a group of cost centers from one controlling area to another?
    Or a group of internal orders?
    Thanks
    Jasmina

    No. If you used any upload tools like LSMW, perhaps you may use that for uploading the second controlling area.

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • Problem in reading an object inside another obj in C thru JNI

    Hi All,
    I am passing a java class object from Jave to C thru JNI.
    This object has many integer fields + one object of another class, which also has some fields.
    I am able to read integer fields from C but not able to read fields inside another object.
    Can anyone plz help me in reading the object inside another object from C.
    I m pasting class here for better understanding :
    public class ImageMergeInformation {
    public ImageInformation outputImageInfo;
    public ImageInformation[] inputImageInfo = new ImageInformation[8];
    public int topMargin;
    public int bottomMargin;
    I wanna read ImageInformation obj.
    Plz help me...
    Thanks in Advance,
    Regards,
    Sneha

    You have to get the field id (getFieldID) of the variable you want, e.g. outputImageInfo, then get the object (getObjectField) in that field. At this point, you can start over (get the class, get the field id, get the object).

  • How to pass a locale object into another function?

    Greetings,
    i like to pass a locale object into another function. These are my code below
    import java.util.*;
    public class Locales{
         public static void main(String[] args){
              Locale locale= new Locale("EN", "US");
              convert(locale);
    public void convert(Locale convert)
         String language = convert.getDisplayLanguage();
         System.out.println(language);          
    }I got this error:
    Locales.java:6: non-static method convert(java.util.Locale) cannot be referenced from a static content
                    convert(locale);
                    ^How do i correct it?
    Thanks

    Did you bother to do a search?
    Did you bother to read any of the material that the search would have linked you to?
    If you had then you would be able to understand where you are going wrong and how to fix it yourself. Instead of being spoonfed by us.

  • How can i send a MESSAGE from an object to another object?

    i've following code:
    class Receiver {
         private String str = "Your message is recieved to me.";
         String sendBack() {
              return str;
    class Sender {
         public static void main(String[] args) {
              Receiver r = new Receiver();
              System.out.println(r.sendBack());
    }I'm confused with the concept of MESSAGE in java. All i gather about it is that when two objects want to communicate with each other they send messages to each other. One object is sender of message and other is its receiver.
    Here reciever object 'r' itself performs its method and does not communicate with any other object. How do i change this code into where two objects communicate with each other?

    Well the OO theory says that objects comunicate via messages, now that information must be taken as knowledge only, not for programming issues really. What you need to know is that when you need to pass any data from onw object to another you can send them via parameters of defined methods.
    For example you have an Object called R of a receiver class and that object needs to pass a String (text message) to another object. you can do it via a method.

  • Assigning object of one class to object of another class.

    Hi,
    How will i assign an object of one class to an object of another class?
    Ex:
    ClassX A=some_method();
    Now how will I assign the object A of class ClassX to the object 'B' of another class 'ClassY'.

    In java you can only assign a object reference of one class into object reference of another class if the first class is the Second class (in other words the first class is a subclass of second class).
    for example if this is a inheritance chart
    Car ==========>Mercedes
    "===========>Audi
    then you can use
    Audi a1 = new Audi();
    Car c1 = a1;
    or Mercedes m1 = new Mercedes();
    Car c1 = m1;
    but not
    a1 = m1;
    before assigning a variable into another variable of different class, use:
    if(variable1 instanceOf ToBeAssignedIn Class){
    variable2 = variable1;
    example:
    Audi a1;
    Car c1;
    if(a1 instanceOf Car){
    c1 = a1;
    Edited by: gaurav.suse on Apr 10, 2012 1:14 PM
    Edited by: gaurav.suse on Apr 10, 2012 1:15 PM

  • Need a way to pass object to another application

    Hello Everyone,
    I need to pass an object from one application to another. I wanted to do that using request.setAttribute(Object) but this works only on RequestDispatcher.forward(URL) method and can be used only within the application you are currently in. It does not work for absolute URLs therefore I cannot go to another application. I also tried response.sendRedirect(URL) but then request object is lost when redirected to another application.
    Any help will be greatly appreciated,
    Thanks in advance,
    Y.M.

    if your two application servers are on the same box,
    then you can get the RequestDispatcher object from
    another ServletContext and then use the
    request.setAttribute() call.
    ServletContext newContext =
    getServletContext().getContext(webApp);
         if( newContext == null )
    throw new IllegalArgumentException("Invalid webApp
    p '"+webApp+"' does not exist.");
    request.setAttribute("myobject", objToPass) ;
    RequestDispatcher dispatcher =
    newContext.getRequestDispatcher(urlToGoTo) ;
    dispatcher.forward(request, response);
    Unfortunately those apps are on different servers ...

  • How are non-cost center Controlling objects best modeled in PCM?

    I appreciate that ALG developed Profitability and Cost Management, and they apparently were unaware of
    or did not consider that SAP ERP uses more than a single controlling object of a cost center; specifically
    internal order, WBS element, real estate object, etc.
    My question is how are these other controlling objects best treated in PCM?
    For example,
    I have a planned trade show internal order to showcase my companies products
    in Berlin to European retailers.  I have planned travel costs, display costs,
    space rental costs on this internal order.
    Normally, I would settle this internal order to CO-PA to determine the planned
    profitability of my Europen retail customers.  Unless I make this order a faux cost center,
    I don't see how to model it in PCM.
    If I exclude this order, then the profitability resulting in PCM is suspect --
    leaving out a major chunk of customer specific marketing expense.
    Or is the process to settle the planned internal order cost to CO-PA, but
    transfer the planned costs from PCM back into CO-PA, which would have the
    benefit of being mutually exclusive and collectively exhaustive.
    Jeff Holdeman hinted at the restrictions imposed by planning in ECC.  Yet
    without a more comprehensive approach, I am concerned that PCM still
    does not represent a complete profitability planning solution.
    Bob McGaffic

    Hi Deepak.
    You can verify is the cost center was posted on document running tcode SE16N on the FALGFLEXA table, put the document number to do research.
    After you can trying to post the new document through Tcode FB50L choosing or not a legder specific, then verify the document was posted correctly running the Tcodes SKb1 or Se16N with FAGLFLEXA table again.
    Also you can check this link Checking the Allocation of General Ledgers to Cost Centres
    Kind Regards
    Jandoval Nascimento

  • Shaded rows in table control object.

    Hi. I've got a question.
    I've got a table control object. When I fill it with data I set all rows shaded (screen-input = 0). But now the problem is that when I want to mark some row / rows (by pressing rectangle at the left side of table object) the line doesn't match
    Could You tell me what should I set more?

    hi,
    what is the command u use for selecting the line?
    is it <ur tabcntrl>-currentline = some variable.
    regards,
    Renjith Michael.

  • How to put data in an ActiveX SequenceVi​ew Control Object (not MFC)?

    Hi!
    In my application (not MFC) I added an ActiveX SequenceView Control Object.
    I want to put data in it.
    But nothing is in it after executing the following code:
    HWND hListView=(HWND)GetDlgItem(IDC_SEQUENCEVIEW1);
    LVITEM lvi;
    lvi.mask = LVIF_TEXT;
    lvi.pszText = "text";
    ListView_InsertItem(hListView, &lvi);
    SendDlgItemMessage(IDC_SEQUENCEVIEW1,LVM_INSERTITE​M,0,(LPARAM)&lvi);
    What is wrong or missing?
    Thanks for helping me!!!
    I tried to use the SimpleMFCOperatorInterface-example but as I am not using MFC it said:
    'CListCtrl' : undeclared identifier
    So this example isn't helpful for me.

    Hi
    If you have TestStand 3.0 installed then you will find a simple example using MFC under
    \OperatorInterfaces\NI\Simple\C++ using MFC
    The OI is written using the new UI controls and the manager controls.
    You need TestStand 3.0 or greater to use the new UI controls
    I hope this helps.
    Regards
    Anand Jain

  • How can delete annual values of Control Objects (FMAVCR01)?

    I have run OBR1 and OBR2 for deleting transaction data and master data. They are already deleted successfully. When I display the annual values of Control Objects with transaction FMAVCR01, It shows the commitment item values which are used in the FB01, their document number, consumed amount. I want to delete consumed amounts of commitment items.
    Wbr.
    İlker...
    Ankara,Turkey
    Edited by: ilker kkeci on Jan 13, 2012 4:04 PM

    Hi,
    The more correct report would be RFFMDLFM, as RFFMDLFI deletes only actuals but not the commitments from FM.
    Regards,
    Eli
    P.S. To be excuted only in 'sandbox'/test systems!

Maybe you are looking for

  • Network,Sound,Video issues -NEW to solaris

    Ok, i think before i ask my questions that i need to get something straight, i don't know a single thing about unix based systems, not one. Unfortunately i am (till i get this figured out) a windows server guy who is trying to get away from microsoft

  • Is there any other way to  limit the data a user can see

    We are using Discoverer 10.2.xxx We are running it against an Oracle applications database but we do not have Discoverer integrated with the apps. I have created database users for discoverer and granted access to the data at the db level. We have ab

  • No Media Transfer Protocol ("MTP") on Clip Jam ? Coming soon?

    I notice that my new Clip Jam doesn't seem to support the 'MTP' (Media Transfer Protocol) - whereas I believe older Clip models used to ? Is this something that will be introduced by a Firmware Upgrade at some point ? My current Firmware is '1.03' wh

  • Resource Constraint

    hi, We are working with resources in which many products can be scheduled based on sizes. Hence, we use size as a characteristic for resource and product. But while defining the characteristic value for resource it will be Resource A: Size:25-75mm, B

  • Requirement for getting 'Powered By NetWeaver' certificate

    Hi, We are planning to get 'Powered By NetWeaver' certification for one of our application. We would like to know, whether the application should support the multiple database. Is this a mandatory requirement for getting 'Powered By NetWeaver' certif