Java version, without Akka