The teen attacked one of the officers with a kitchen knife, leaving him with a minor cut on his torso, Robinson said. He also hit two other officers, but neither suffered serious injuries.
One of the officers then fired two shots, hitting the boy once in the wrist. The teen was taken to a hospital in serious condition, EMS spokeswoman Shayne Enright said. His injuries were not life-threatening.
"The suspect was taken into custody and walked out of the school," Robinson said. He added the boy was arrested on suspicion of three counts of attempted murder.
The incident prompted a lockdown at Roosevelt, which has an enrollment of nearly 1,400.
The officer who fired is on administrative leave during an investigation, Robinson said.
It wasn't immediately clear whether the officer who fired aimed for the boy's arm or another part of his body. Robinson said the details were part of the ongoing investigation.
Tenari Maafala, president of the statewide police officers union, said the knife posed a clear threat and officers are trained to stop a threat, regardless of the suspect's age.
"They didn't come here looking to shoot somebody," said Maafala, who went to the school as part of the Honolulu police peer support unit.
Noah Powell, a 16-year-old junior, said the shooting happened in a school counselor's office. Powell said he was in a nearby office and heard the struggle and shots but didn't see the 17-year-old or know who he was.
Powell texted his parents afterward to let them know he was OK. He said he also posted on Facebook that he was fine and got quick responses from people saying they were praying for the school.
Kealii Akiona-Soares, a junior, was in a social studies class when he heard a faint shot at about 8:20 a.m.
Then a school bell sounded and students were kept in their classrooms, the 17-year-old said. He said his class continued with a politics lesson, and everyone kept mostly calm.
"I guess it happens a lot in mainland schools, so it's not surprising," Akiona-Soares said.
Several parents, including Carolyn Richardson, gathered outside Roosevelt after word of the shooting spread. Some were visibly upset, and many texted or called their children, who were still on lockdown inside.
"This is really freaking me out," Richardson said.