Client/Server remote execution

F

freeposte

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
 
B

Benji

freeposte said:

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top