I would suggest that we can, somewhat roughly, distinguish two very different things that often go by the name 'just war theory':
The first is what we can call the virtue-oriented approach. The 'just' it refers to when it talks about whether war can be just is the adjectival form of 'justice', understood as a personal virtue. Its major question is: "Can a person be just, i.e., virtuous, while engaging in the activities of war, and if so, how?"
The second is what we can call the law-oriented approach, although 'law' here has to be understood in a broad sense. In this form of just war theory, 'just' implies justifiability according to certain standards. Its major question is: "What are the rules and criteria for determining when activities of war are justifiable?"
Modern just war theory seems to me to be a muddling together of the two. They aren't mutually exclusive, but, as people have pointed out, there seems to be a lot of shifting from one to the other and back again without much explanation. The roots of just war theory, I think, are in the first. St. Augustine's discussions of war are scattered, but he often tends to emphasize matters of personal virtue. What often worries him is the possibility of a vengeful spirit taking hold (cf. Contra Faust. xxii, 74); it is because of this that he famously insists (1) that only defensive wars are permissible; (2) that the purpose of war is to return to peace (Ep. ad Bonif. clxxxix); and (3) that, since peace is the purpose of war, wars must be waged in ways consistent with that aim (ibid). However, Augustine has a very strong notion of peace here, and attacks the notion that 'peace' just means the absence of conflict (cf. De Civ. xix). Peace is a harmony, and a harmony is not just a lack of discord, it is a concord -- the tranquillity of order in which each thing has its special place. If Augustine is the originator of just war theory, as he is often said to be, it is fair to say that his just war theory is a small part of a larger account -- one spanning heaven and earth -- of just peace.
This characteristic is carried over, although in ways perhaps not immediately obvious, by St. Thomas Aquinas, the other figure who looms large in the history of just war theory. Thomas considers the matter in ST 2-2.40, which is usually considered on its own. That it is, is a bit unfortunate, since it overlooks the context of the discussion. The discussion of war and justice comes in the middle of Aquinas's discussion of charity, and it arises as an issue because of the connection of charity to peace. The Christian virtue of charity is in Aquinas's account an operative disposition to true friendship between self and others. It gets its name from its primary act, love; but, as Aquinas holds that we love and enjoy the good in the same act, charity disposes us not only to love but also to acts of joy, peace, and (in special cases where the beloved is in a miserable state) mercy. Joy is the delight in the good of another that follows from love; peace is the union love creates. Each of these aspects of charitable love has its opposing vices; love as such, for instance, is impeded by hatred, while joy is impeded by sloth and envy. It is in this context that Aquinas builds his account of just war. Anything inconsistent with charity is inconsistent with Christian morality, since charity is its keystone; since peace is an act of charity, anything that impedes peace is inconsistent with the way of life Christians should live. While peace is directly and properly an act of charity, Aquinas also thinks that in a looser sense it can be considered an act of justice, not because it follows directly from justice, but because justice removes impediments to peace. So, if justice removes impediments to peace, and peace is an act of charity, and charity is the most important of all the virtues, we are immediately brought to the question: to what extent does justice remove war as an impediment to peace?
Thomas's answer to this question is fairly widely known. War can itself be an act of justice in certain cases. A prince can justly engage in activities of war if he has (1) legitimate authority; (2) a just cause; (3) rightful intention. The cases in which war is consistent with justice are cases in which a particular person has been entrusted with maintaining the common good shared by all citizens and defending it against anyone who might try to destroy it. This is where legitimate authority comes in: no one can legitimately go to war who does not have a responsibility to protect the common good of a people. However, even if you have a magistrate with the authority to go to war, more is needed before one can consider war an act of justice; the cause, the goal in going to war, must itself be just. The power to war is, on Aquinas's account, a form of the power to punish: just as we give people the power to punish citizens who violate the common good by breaking the law, so we give them the power to punish those who attack the common good from without. Aquinas, taking his cue from a comment by Augustine, identifies two goals that would be just: restoring what has been unjustly seized, and to punish states who refuse to make amends for wrongs committed by their subjects. (It isn't clear whether he thinks these are the only two possible just causes, but the wording seems to suggest it.) The third thing needed, right intention, is often misunderstood. The Latin word intentio has a much broader meaning than our term 'intention'; it can often be translated by 'disposition' or 'orientation'. To go to war justly, it's not enough to have the right authority or a good cause; you also need to organize yourself and your actions in such a way that they tend to advance the good and avoid evil. Obviously, good intentions in our sense are part of this, but only part. The term as we find it in Aquinas appears to suggest our whole involvement in war should be a matter of securing peace and righting wrongs.
Stated this way, I think it's very clear that what we have in Aquinas is a virtue-oriented approach to matters of war. However, it's also very tempting to take these three elements of just warring -- legitimate authority, just cause, and right intention -- and try to work out more precisely what they involve, in order to create criteria by which one might determine whether particular cases are just or not. And thus we begin to see in Aquinas the seeds of what I've called the law-oriented approach. And, in fact, the Spanish scholastics, taking their start from Aquinas, begin to develop such an approach as part of their general interest in matters of what we would today call 'international law'; their discussion sparked other discussions, e.g., in the Protestant scholastics, and the discussion was carried further by people like Pufendorf and Grotius. There are a lot of differences among the various participants in this discussion, and I'm not going to go into any of them. Suffice it to say that the end result is a list of criteria for 'just war'. The list as we have it today varies a bit, but a fairly standard example (listed in no particular order) would be:
1. legitimate authority
2. right intention (in our usual sense of the term)
3. prospect of success
4. proportionality in use of force
5. last resort
6. discrimination between belligerants and non-belligerents
7. public declaration
As has become more clear in recent decades of discussion, though, if you are going to start listing criteria, you need to distinguish the sort of criteria to be used in starting a war from those involved in conducting a war and those involved in ending a war and restoring peace.