Punishment is definitely not the answer for Jack's misbehavior, nor giving him all the attention he wants during class. Hence, isolating Jack from the rest of the class may be effective, like talking to him after class or during recess and ask if there is something wrong or bothering him. The teacher may reinforce Jack's behavior. If Jack tries to participate in the class, or at least avoid disrupting his classmates, the teacher will give him rewards.
Jack's parent must also be informed about his misbehavior in class so that they can do something about it. They may try involving Jack to other school activities where he can get along with other children. In that way, his need for attention might be satisfied.