Open terminal for each command and execute the following:
$ chmod +x *
$ ./run.sh
$ java MyServer
$ java Writer
$ java Reader
For Reader it will be prompted with id, for one command give the id as 1 and for the second reader give the id as 2.
Now you can use the phrases like "pause", "resume" and "stop" for the reader.
Also in MyServer.java file, make sure the ip address is properly set.