The two men accused of an attack on a man, who later died of his injuries, have appeared in court without a public audience.