The heavily armed teen appears to have been motivated to launch Thursday's assault by “bad relationships” with his classmates and aimed to kill up to 14 of them, authorities said.
The shooter, who has not been named because he is a minor, was charged with attempted homicide, and an accomplice was charged with helping him. Both are behind bars.
Investigators said the boy, a student at the Alexis de Tocqueville high school in the hillside town of Grasse, was carrying a small arsenal of weapons as well as a homemade explosive device in a bag.
Authorities have not detailed their evidence against the 17-year-old alleged accomplice, and he refused to speak to investigators.
However, his parents recently reported him to authorities for writing a letter to an American prisoner in the state of Ohio who is serving a sentence for committing three murders at a high school.
The head teacher and four pupils wounded in the attack were not the intended targets of the shooter, said local prosecutor Fabienne Atzori.