When you gain JP, it'll go into the job that you're currently using - even if you use another job's skills, like a Knight using the Charge skills.

So the quickest and easiest way to gain JP is to have everyone learn Accumulate and GainedJPUp from the Squire's skillset (unfortunately, story characters besides Ramza can't learn Accumulate). You can use Accumulate as much as you want, and it hits every time, so it'll give you a lot of XP and JP. Just have everyone in your battle party use Accumulate every turn (Ramza can use Yell, Cheer, or Scream).