Simple chat application in Java