Java example updates