Client/Server remote execution

Discussion in 'Java' started by freeposte, Nov 4, 2005.

  1. freeposte

    freeposte Guest

    Hello dear membres of the alt.comp.lang.java newsgroup. I'm trying to
    develop a remote execution server. The Server executes linux commands given
    by the Client, both interconnected by a socket.
    Example
    The Client send the "ls -l" command to the Server and the Server send the
    result to the output of the Client.

    Client to Server > ls -l (+enter)
    drwxr-xr-x 2 root root 4096 2005-11-04 12:21 backup
    -rw-r--r-- 2 root root 780 2005-11-04 12:22 Client.java
    -rw-r--r-- 2 root root 780 2005-11-04 12:22 Server.java

    I've already got the simple Client/Server Java code but I don't know the
    Java functions for the Server to execute linux commands on the system.
    Please does anybody can show me a sample Java code of such a server ? Please
    is there any good tutorial on this out in the internet ?

    Many Thanks.

    Octavio
    freeposte, Nov 4, 2005
    #1
    1. Advertising

  2. freeposte wrote:

    > Hello dear membres of the alt.comp.lang.java newsgroup.


    Where did the 'alt' come from?
    Andrew Thompson, Nov 4, 2005
    #2
    1. Advertising

  3. freeposte

    Benji Guest

    freeposte, while high on whiteboard markers, wrote:
    > <snip>


    Your post is unclear, but it sounds like you just want Runtime.exec().

    If that doesn't look like what you want, post a more specific usecase.

    --
    Of making better designs there is no end,
    and much refactoring wearies the body.
    Benji, Nov 4, 2005
    #3
  4. freeposte

    Roedy Green Guest

    On Fri, 4 Nov 2005 18:10:53 +0100, "freeposte" <>
    wrote, quoted or indirectly quoted someone who said :

    >I've already got the simple Client/Server Java code but I don't know the
    >Java functions for the Server to execute linux commands on the system.
    >Please does anybody can show me a sample Java code of such a server ? Please
    >is there any good tutorial on this out in the internet ?


    see http://mindprod.com/jgloss/exec.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
    Roedy Green, Nov 5, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    1
    Views:
    538
    Ashish M Bhonkiya
    May 13, 2004
  2. sandiyan

    Java books and remote execution

    sandiyan, Mar 2, 2004, in forum: Java
    Replies:
    1
    Views:
    317
    TechBookReport
    Mar 3, 2004
  3. Siddharth Jain
    Replies:
    1
    Views:
    2,880
    Thomas Fritsch
    Dec 2, 2004
  4. Sid
    Replies:
    0
    Views:
    419
  5. -
    Replies:
    2
    Views:
    397
    Alan Krueger
    Jul 29, 2005
Loading...

Share This Page