2 separate programs share one int variable

Let's say I compile and execute a java program that returns an integer. It is just saved temporarily in an int variable and the code cannot be changed. After that, I want to compile and execute a second program that fetches the integer that had been returned in the previous program. I cannot save the integer in a text file for later use. Is there any possibility to do that? How would such a second program look like?

I took that as emphasising that the second program
couldn't have any kind of dependency upon its earlier
invocation (for example, it couldn't set up a named
pipe, or start a thread, or something).
Dave.Ok, that makes sense. But it still doesn't explain:
I cannot save the integer in a text file for later use. Does that mean that he doesn't control the first application, or is it because it's a distributed system? He says that he isn't allowed to recompile the first application, so he actually wants to attach to that proccess and read the value? I.e. write an proccess that uses the debugging api?
/Confused

Similar Messages

  • Global variables to share data between separate programs.

    Hi guys and gals,
    On the advice of a lv consultant, we've used an array of global
    variables to share data (about 100 variables) between an acquisition/control
    program and a consumer program (datalogging) running on the same PC. This
    worked fine in the development environment. However it no longer works when
    the two programs are compiled. Is there a trick to get this to work or do
    we have to use datasockets or DDE to move the data.
    In case you're wondering the idea of two separate programs is to
    separate the critical control and data acquisition functions from the less
    critical but more likely to error datalogging functions.
    Regards,
    Alf Katz,
    [email protected]

    There are several solutions:
    1.) Use VI Server available in LabVIEW 5.1 and Up to provide a communication
    path between the two executables.
    2.) Use a data file to transfer the data between the two executables.
    3.) Use a TCP/IP connection there are several examples included with LabVIEW
    showing the mechanics of this.
    The simplest method is Number 1. Using the VI server, you open the
    connection and then retrieve the data form the Global VI based on the
    Parameter Name. It is very fast and requires very little processor
    overhead. Make a driver to Open the connection then a Read to get the data.
    Do not open and close the connection everytime, there is a lot of overhead
    in the Open connection call.
    Make sure you configure the VI Server within the development environmen
    t.
    Also you must include a few statements in the Executables INI file to
    correctly enable the VI server capabilities.
    Regards,
    Jeff Meyer
    Consultant
    Focused Energy
    Suffield, CT USA
    "Alf Katz" wrote in message
    news:[email protected]..
    > Hi guys and gals,
    > On the advice of a lv consultant, we've used an array of global
    > variables to share data (about 100 variables) between an
    acquisition/control
    > program and a consumer program (datalogging) running on the same PC. This
    > worked fine in the development environment. However it no longer works
    when
    > the two programs are compiled. Is there a trick to get this to work or do
    > we have to use datasockets or DDE to move the data.
    >
    > In case you're wondering the idea of two separate programs is to
    > separate the critical control and data acquisition functions from the less
    > critical but more likely to error datalogging functions.
    >
    >
    > --
    > Regards,
    > Alf Katz,
    > [email protected]
    org
    >
    >
    >

  • Can one upgrade from LP9 to LPX or is it a complete new purchase? Does it load as a separate program or does it integrate into LP9?

    It's still cheap at the price but one used to be able to purchase an upgrade. What happens now?
    Does the download integrate with LP9 or is it a complete new program/

    There are no upgrades.. or discounts...
    Logic Pro X is considered a separate program (as are all App Store sold programs these days)  to LP9 and so there is no discount if you own an earlier version of Logic Pro
    Note: The cost of LPX is actually much less than it used to cost to upgrade from say, LP8 to LP9...  so while there is no upgrade pricing, the new version costs less than it would have cost to upgrade from a previous version, in the past anyhow... and by quite some degree.
    Example: To upgrade from LP8 to LP9 cost $499 originally.... whereas the full version of LPX only costs $199
    LPX is kept as a separate program on your Mac  so if you have LP9 already installed..  you can continue to run and work with LP9 if you wish. (for creating and working with projects for example, that contained 32bit AU plugins which LPX no longer supports)  
    LPX and LP9 also do share some content between them... but LPX comes with a lot of new content that is not available in LP9.
    Note: LPX can import projects created/saved in LP9 but LP9 cannot import projects created/saved in LPX.

  • My wife and I share one itunes account with separate libraries. When I sync her iphone in her library, it adds all of my iphone contacts to her contact list. How can we void this?

    My wife and I share one itunes account with separate libraries. When I sync her iphone in her library, it adds all of my iphone contacts to her contact list. How can we avoid this?

    Make groups of contacts in your Address Book and select the option to sync only selected groups to each phone.
    This explains how to create groups:  Mac 101: Address Book, http://support.apple.com/kb/ht2486

  • My wife an I share one iTunes account but have separate Apple id for our devices - prior to 8.1 we shared storage on iCloud now we can't and when I try to buy more storage on her phone instead of accessing the shared iTunes account it try's to sign

    MMy wife an I share one iTunes account but have separate Apple id for our devices - prior to 8.1 we shared storage on iCloud now we can't and when I try to buy more storage on her phone instead of accessing the shared iTunes account it try's to sign in to iTunes using her Apple id - I checked the iTunes id and password on both devices - can anyone help

    Have a look here...
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • My wife and I each have an apple ID and share one macbook pro. Is it possible to use the iCloud on our shared macbook pro and our two separate iPhone 5's and not get each others information confused?

    My wife and I each have an apple ID and share one macbook pro. Is it possible to use the iCloud on our shared macbook pro and our two separate iPhone 5's and not get each others information confused?

    Once you setup your wife's account you can enable fast user switching to make it easy to switch accounts:
    OT

  • My husband and I share one computer.  We want to be able to share the same music on our iPhones, but we don't want to share the same contacts and applications.  How can I set this up so we still share music, but everything else is separate on our iPhones?

    My husband and I share one computer.  We want to be able to share the same music on our iPhones, but we don't want to share the same contacts and applications.  How can I set this up so we still share music, but everything else is separate on our iPhones?

    Welcome to the Apple Community.
    iTunes and iCloud are different accounts. You can both use the same ID for the store login and share your music etc., and use different ID's to log in to iCloud, thereby keeping your calendars etc separate.

  • How do we share one iTunes account but have separate users

    My family all have apple products, but cant figure out how to share one account as a family, share applications, and the rest, but have differant users. Is there an actual way to do this?

    You can edit the information on your Apple account in a number of places (they all link together)
    On Apple.com - http://store.apple.com/us/account/home
    On the Apple ID Website - https://appleid.apple.com
    On iTunes - Choose Store > 'View Account' from the Menu Bar.
    On an iOS Device - Go to Settings > iTunes & App Store > Tap on the 'Apple ID' > Tap 'View Apple ID'
    Good Luck!

  • How to share one variable across multiple JVMs?

    Hi,
    How to share one string value across two applications, which are there in two different JVMs.
    Requirement is, If I update one value(static) in first server through jsp, it should update second server static value too apart from first server.
    I am using WebLogic 8.1, is there any MBean to access other application's static value?
    Please suggest!
    Thanks,
    Murthy P

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • How to share one application's static variable in another application?

    Hi,
              How to share one string value across two applications, which are there in two different JVMs.
              Requirement is, If I update one value(static) in first server through jsp, it should update second server static value too apart from first server.
              I am using WebLogic 8.1, is there any MBean to access other application's static value?
              Please suggest!
              Thanks,
              Murthy P

    I'd need more information to recommend an appropriate approach.
              How often do you access this value? Can you make a remote call to retrieve it each time, or would that overhead be unacceptable? How are you handling HA? (ie what happens when a server fails). How often do these values change, and what is your tolerance for stale data?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Separate program to send a smartform converted into pdf, thru mail

    Hi Folks,
    I had created a smartform and converted it into a PDF format.
    Now I want a separate program where in if i submit this program it should sent it throuogh mail.
    Note:-<b>I want a separate program not the one where in you design a smartform,convert into pdf and then send thru mail all in one program</b>
    Points will be given.
    K.Kiran.

    hi kiran
    the program is as follows
    The user is provided with
    a) file name
    b) email address to send mail
    and it sends ANY FILE (.xls,.pdf .xyz..)
    Instantaneously !
    4. Make two things first :
    1. Include with the name : ZAMI_INCLFOR_MAIL
    2. Report with the name : ZAM_TEMP147 (any name will do)
    3. Activate both and execute (2)
    4. After providing filename, email adress
    5. Code for Include :
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc <> 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    CODE FOR PROGRAM
    5.
    REPORT zam_temp147 .
    INCLUDE zami_inclfor_mail.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    regards,
    navjot
    reward if helpfull

  • Share one iClould Drive with multiple family members

    I want to upgrade to iCloud Drive for more storage. Instead of two iCloud Drive accounts (20GB each), can my wife and I share one iCloud Drive account (200GB) to backup all our iOS devices and Macs? We use 2 Apple IDs.
    iOS devices: iPhone 6+ (1 gen), iPad Air (1 gen), and iPad Mini (1 gen) running iOS 8.1.
    Macs: Mac Pro 2013 and MacBook Airs 2012 running Yosemite 10.10.
    I plan to use the iCloud Drive to back-up our iOS devices (signed with 2 different Apple IDs) and store files.

    To fix this go to Settings>Messages>Send & Receive and do one of the following:
    1.    Either uncheck the email address shown under "You can be reached by iMessage at" on both phones; or
    2.    If you want to continue to receive iMessages at this email address on one of your phones, on the other phone tap the Apple ID at the top, sign out, then sign back in using a different Apple ID (so both phones will be using a different Apple ID for iMessage).  Note: you can continue to share an Apple ID for purchasing from the iTunes and App stores.  It does not need to be the same as the ID you are using for iMessage, FaceTime and other services.
    Because you are  using the same Apple ID for iMessage. To prevent this, on one of the phones go to Settings>Messages>Send & Receive, tap the Apple ID, sign out, then sign in with a different Apple ID.  Note: you can continue to share an Apple ID for purchasing; it does not need to be the same as the ID you use for iMessage, FaceTime, iCloud and other services.
    Also, to prevent merging your calendars and contacts if you are syncing these to the same iCloud account, be sure to set up separate iCloud accounts on each phone with separated IDs.

  • Can two computers share one iTunes library?

    I am trying to map out a new plan for how we store and play music via iTunes at home. Currently, our music is stored on a windows PC and played via iTunes and an airport express.  I recently bought a new macbook and am considering an airport extreme with the hope that I can store the music on a hard drive attached to the airport extreme and play music from either computer.  Can the two computers share one library? I already have home sharing turned on and can access my library from the macbook, but if possible, I would prefer having the hard drive separate of the desktop.  Any reason this won't work?
    Thanks!
    -JDJ

    Ziatron wrote:
    Yes, two computers can share the same library.
    I periodically copy my iTunes library from my Mac Pro to the Mac Mini.
    They aren't using a single library. Each computer is using its own copy and you have two sets of library files.  It can certainly be done that way but if between copy sessions you edit a bit of each library then it is a bit of a muddle trying to make sure your versions are synchronized with each other.  For example, ratings are stored only in the .itl file, so if you rate a song on your second computer it will get lost the next time you copy over from your first.

  • Two users share one Apple ID, on two phones. can they be separated without losing phone backups? IE creating a new ID for one of the users?

    my in-laws share one apple id for two separate iPhones. They would like to create a new ID for one of the users but maintain his current backup. can this be done?

    If you want to create a new account make sure you sign out of everything via the settings. (ICloud, iTunes, facetime, messages, etc) APPS: since the apps were downloaded with a different apple ID, you will always need to use the password for the apple ID that downloaded that particular APP when it needs to be updated. Unless it is free, you can simply delete it and download it under the new apple ID. As for the music, you can keep it on the IOS device,  but if it's accidentally deleted, you'd have to sign back into the original account and download from the cloud. (But, you risk getting the 90 day lockout. )

  • My wife and I own an iMac (April 2011) and just recently got iPhones.  We share one iTunes account (mainly for our uploaded music from CD).  Do we each need to have our own iTunes account?  What about iCloud?  We want to utilize the same Calendar/Contacts

    My wife and I own an iMac (April 2011) and just recently got iPhones.  We share one iTunes account (mainly for our uploaded music from CD).  Do we each need to have our own iTunes account?  What about iCloud?  We want to utilize the same Calendar/Contacts

    JoeyV325 wrote:
    Is there a way to move music/apps from one ID to a new ID?
    No.
    One of you create a new AppleID and one use the existing AppleID.
    But you can still use the items in each iTunes library.
    Create separate computer logins for each of you.
    This will give you each your own data. Contacts, calendars, photos, etc. (and your own iTunes library).

Maybe you are looking for