A 19-year-old accused of bringing a rifle to an Illinois high school and exchanging gunfire with a school resource officer appeared in court Wednesday.