A 21-year-old man and 15-year-old schoolboy have been remanded in custody in connection with weekend disturbances in County Antrim.
The charges relate to trouble after a bonfire in the Dunclug area of Ballymena in the early hours of Sunday.
Police were attacked by a crowd of up to 50 people who threw petrol bombs, paint and stones.
James Brian Greer of Sandown Park, Ballymena is accused of having a petrol bomb, having intent to cause damage to police property and having intent to injure police officers.
A detective told Coleraine Magistrate's Court on Monday that the accused made no reply when charged.
His solicitor said Mr Greer had denied involvement in the incident throughout questioning.
The 15-year-old schoolboy, who cannot be named, is charged with having a petrol bomb and material to make petrol bombs.
The court heard he had claimed to police he only wanted to set fire to the bonfire.
Both were remanded in custody until 9 September.