"A psychiatrist told the judge the boy suffered extreme anxiety because of intense media coverage of the case and does not want to testify."
I don't believe the judge can force the boy to testify. If he does, I would send the resultant psychiatric bills to the judge. He is victimizing the boy much more than his teacher did.
A criminal has an absolute right under the Constitution to face the accuser and to call the accuser as a witness in trial. The fact that he is 14 cause the judge to empty the courtroom, but there is no way to prosecute the case without having the boy available to testify.