If you want the client part to just pass a command, in a sort of "fire and forget" mode, you just need to implement a queue of some sort.
You can do it simple by adding a file to a folder, and having the server scan.
You can do it using a socket connection.
You can do it using a HTTP request.
You can do it using a Database, and a "server" in the database as a stored procedure, or a server polling the database.
You can do use a message queue.
There are many possibilities. If client and server are on the same machine, you can use commands in shared memory, or you can use pipes.
I think you need to specify if the communication between client and server must transport large amounts of data, or it is a simple command. And you must also decide if the server should contact the client when the command is executed.
There are lots of examples available, I found this old one showing how to do socket communication in java:
http://www.javaworld.com/jw-12-1996/...ts.html?page=1