Add echo and chat examples for java-server