In Holdem the winning hand is always comprised of the best 5 cards. KKKKA or KKKKQ beats KKKKJ. If you have a pair of jacks as in your situation, you are playing the board because your hand doesn't improve on the board any. If he has a pocket A or Q, you lose.