Updated java cookbook to the latest