Madrid (CNN) -- A 25-year-old Spanish man has been ordered by a judge to leave home and look for a job after he took his parents to court for stopping his allowance money.