Fixing up Java version of server