I have been working for over three years for a really small tech company (about 12 people in the team). This is also my first job ever. I have two bosses, the company owner who works almost always remotely (let's call him John) and a shareholder (let's call him Jack) that had been working with my boss for a long time but had been just a coworker, becoming a shareholder only recently.
I am constantly clashing with Jack: He views me as insubordinate (he himself already said so multiple times). I always obey an order coming from him, but sometimes I try different approaches, or make suggestions, or state my opinions, still respecting what he had said. He is highly inquisitive, and if he thinks you're behaving incorrectly, he will expose that by calling you out publicly (for everyone in the office to hear). Whenever someone asks him a question (even through chat), he almost always replies by voice. And many times he will, without even fully reading what you wrote, inquire about your questions, often saying he "did not understand". Most of the time he addresses others with a strong voice tone giving the impression he is rudely correcting you. I find his behavior unprofessional and abusive sometimes. Even if he doesn't intend to make others feel bad, he makes me (and others, probably) feel bad when we are on the receiving end of such behavior.
The problem is that I feel he is harsher with me because he doesn't like my behavior. This led me to do a very bad move out of impulse: I complained about an episode (his behavior) in writing to John. John wrote back and was rather understanding, but told about my complaint to Jack. Jack was furious, and his behavior has grown worse. Last wednesday he nearly insulted my skills, and rudely replied "I have already explained you that" once asked a question.
I believe Jack strongly wants me fired, but John doesn't, and a private discussion between them probably already happened concerning this.
Excluding the obvious escape (leaving the company), how can I deal with him to mitigate his behavior?
**EDIT (2) I am editing here because I am not being honest with myself, even. The real reason why I don't want to leave this job, at least FOR NOW, is because I am aiming for either a programming or database oriented job and I feel having had just a single actual development project is not enough practical knowledge. I want to have more confidence in myself and I feel that comes as I go through more concrete, more valid experiences. **