AN immature high school arsonist shook in the dock as a District Court judge today spared him an immediate custodial sentence.

Judge David Lovell told Edward Brian White that the decision to suspend his four-year sentence for causing a $1 million fire to Unley High School was a difficult one.

White, 19, of Mitcham, had pleaded guilty to one count of arson.

Judge Lovell found White intended to set fire to a wooden walkway in the school, but did not expect the catastrophic blaze that ensued.

He said the self-described "class clown" then made admissions on Facebook and, after returning to the scene, was interviewed by television media as a supposed eyewitness.

"You posted on Facebook about what you had done and made admissions on Facebook about what you had done. This shows your immaturity," he said.

White had previously claimed he didn't intend to cause such a significant fire - he only wanted to cause mischief.

But that was rejected by Judge Lovell.

"You say (you went to the school) with the intention to cause some mischief. I reject that submission," he said.

"At that stage you intended to inflict some damage, it was more than just mischief."

Prior to burning the school, White - in the company of some friends - stole methylated spirits from a service station.

"I have no doubt that you were showing off in front of the girls," Judge Lovell said.

The court heard White suffers from a range of disorders including panic attacks and anxiety.

White received a four-year jail term, with a non-parole period of two-years.

That was suspended on condition he sign a $500, 18-month good behaviour bond.

Throughout the hearing, a teary White shook in the dock.

Outside court he would not comment, but his lawyer, Brian Deegan, said White regretted his actions and felt apologetic.

"He has felt remorse from day one," he said.