Java version implemented.