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
Andrew Thompson - 04 Nov 2005 19:38 GMT
> Hello dear membres of the alt.comp.lang.java newsgroup.
Where did the 'alt' come from?
Benji - 04 Nov 2005 19:47 GMT
> <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.

Signature
Of making better designs there is no end,
and much refactoring wearies the body.
Roedy Green - 05 Nov 2005 11:23 GMT
>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

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.