updating java samples