Final answer:
In a criminal trial, a judge can compel the attendance of a witness by issuing a subpoena and holding the witness in contempt of court if they fail to comply.
Step-by-step explanation:
In a criminal trial, a judge has the authority to compel the attendance of a witness. This means that the judge can order a witness to come to court and testify. The judge can issue a subpoena, which is a legal document that requires a person to appear in court and give testimony. If a witness fails to comply with the subpoena, the judge can hold the witness in contempt of court, which can result in fines or even imprisonment.