Ganesh took out a footwear from a plastic bag he had brought with him and threw it at the judge. Police constables present in the court immediately overpowered him and whisked him away.
Ganesh accused the judge of unnecessarily prolonging the trial, police said.
The judge adjourned the court and went into his chamber, but returned after five minutes and continued hearing other matters, they added.