“A war is just if there is no alternative, and the resort to arms is legitimate if they represent your last hope.” (Livy)
One little problem with Livy’s idea is that a last hope may still lead to a stupid and unnecessary war. Many wars seem to be caused by people with ’emotional issues’ who cannot bear to be wrong or to have their will thwarted. Until leaders of nations stop letting their egos and psychoses drive decision making war will always be with us.
NB: I once wrote a 10,000 word essay on just war in the middle ages, it did not seem to be possible then either