fix java samples