Chat application written in java