 <p><code>getText()</code> is returning null, so you're writing "null" down to the server. At least, that's what I found after changing your just enough to get it to compile and run.</p> <p>After changing <code>getText()</code> to return "hello" I got:</p> <p>Server:</p> <pre><code>Server is starting... Server is listening... Client Connected... </code></pre> <p>Client:</p> <pre><code>java.io.BufferedReader@7d2152e6 Text received: hello </code></pre> <p>(The "BufferedReader@7d..." line is due to <code>System.out.println(is);</code>)</p> <p>Note that after the client has disconnected, your server is going to keep trying to send "null" back to it, because you don't test for <code>line</code> being null in the server code.</p>