A judge set bail at $1.5 million for Bryan Oliver, 16, and scheduled a preliminary hearing for February 21.

Oliver, appearing in handcuffs wearing an orange jail uniform and sneakers, answered "Yes, your honor" when Kern County Superior Court Judge Michael Lewis asked if he chose to waive his right to a preliminary trial.

Oliver is charged as an adult with two counts of attempted murder and three counts of assault with a deadly weapon after opening fire at Taft High School Thursday, wounding two people, one seriously. The two victims, Jacob Nichols and Bowe Cleveland, are expected to recover.

Oliver's attorney, David Torres, spoke for his client throughout the hearing, including entering Oliver's not guilty plea when the charges were read.

Before the proceeding, Torres filed a motion to bar cameras from the courtroom, concerned that publicity would compromise his client's right to a fair trial. Lewis denied the request, citing an overwhelming public interest and the prosecution's decision to try Oliver as an adult.

JUST WATCHED

Student: Gunman had a hit list

MUST WATCH

JUST WATCHED

Student to mom: There's blood everywhere

MUST WATCH

Student to mom: There's blood everywhere00:46

PLAY VIDEO

After Thursday's shooting in the small community of Taft, about 30 miles west of Bakersfield, Kern County Sheriff Donny Youngblood told reporters that the gunman was taken into custody after a teacher persuaded him to drop the weapon and surrender.

The teacher had suffered a pellet wound to the head from one of the shots, authorities said.

Campus counselor Kim Fields helped distract Oliver as students ran. Both employees were hailed as heroes. "They stayed and probably distracted him and probably allowed students to get out of the classroom," Youngblood said.

"He (the gunman) said, 'I wasn't aiming at you,' and said the name of the student he was aiming at," he said.

When Oliver was taken into custody, he had a shotgun and about 20 rounds of ammunition, Youngblood said.

Immediately after the shooting, authorities executed search warrants at Oliver's home, less than a block from the site of the shooting. A motive has not been revealed, but authorities are investigating a theory that bullying may have played a role.

A full-time armed police officer was assigned to the school, but authorities said heavy snow in the San Joaquin Mountains prevented the officer from leaving his home.

The most seriously wounded victim was airlifted to a hospital in Bakersfield and treated for gunshot wounds to the chest and abdomen, Pruitt said.

U.S. Rep. Kevin McCarthy, whose district includes the town of Taft, expressed sympathy to his constituents. "I am deeply saddened and troubled by news of the shooting," the Republican lawmaker said.

U.S. Sen. Dianne Feinstein, whose father graduated from Taft Union High School, expressed her sadness but said the incident was a call for gun legislation reform.

"My thoughts and prayers are with the victims, and I wish them a speedy recovery," Feinstein said. "But how many more shootings must there be in America before we come to the realization that guns and grievances do not belong together?"