Communicate with running JAVA pgm - Unix

This is a discussion on Communicate with running JAVA pgm - Unix ; Hi Trying to to start a Java pgm and then communicate with it multiple times I want to start a Java pgm then somehow from another pgm - tell the Java pgm to do something {Kind of communicating with a ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Communicate with running JAVA pgm

  1. Communicate with running JAVA pgm

    Hi

    Trying to to start a Java pgm and then communicate with it multiple
    times

    I want to start a Java pgm then somehow from another pgm - tell the
    Java pgm to do something
    {Kind of communicating with a Windows app thru Windows messages}
    Prior we started a Java pgm with a cmdline but it shutdown after each
    call - I want to keep the Java
    pgm running and somehow tell it to react to some data thru multiple
    calls to the running exe

    Any suggestions or examples on how I may handle this???
    Thanks

  2. Re: Communicate with running JAVA pgm

    In <415d0a7f-7597-4805-b381-8382d8ef2ad9@j22g2000hsf.googlegroups.com> hchs1977@yahoo.com writes:

    > Trying to to start a Java pgm and then communicate with it multiple
    > times


    > Any suggestions or examples on how I may handle this???


    One common way is to set up the java program as a server, and have it
    accept incoming socket connections. Then write a second smaller program
    to send messages via the socket.

    Other mechanisms will work also. You could have the program periodically
    check for the existence of a specific file, and if it finds the file it
    opens it and looks inside for a message.

    --
    John Gordon A is for Amy, who fell down the stairs
    gordon@panix.com B is for Basil, assaulted by bears
    -- Edward Gorey, "The Gashlycrumb Tinies"


+ Reply to Thread