Oh boy. With all due respect, I think you have quite limited understanding of network computing and remote access. Runtime.exec executes on the local machine; where else would it execute? Do you see anything in that method call that could be construed as telling it to do otherwise (if that were even possible, which it is not)?
If you want to execute commands on a remote machine, you need to open a Telnet or SSH session. Telnet has fallen out of favor since it's less secure than SSH, so the target machine may not support it; if it does, then you can use the Telnet client code that's part of the Apache Commons Net library.
If SSH is available, check out JSch; it's a Java client library for that.
Lastly, using readLine and println with sockets is bound to cause you grief. This is a good article on that issue:
http://www.fenestrated.net/~macman/mirrors/Apple%20Technotes%20%28As%20of%202002%29/tn/tn1157.html