Why is the just war theory considered a middle path between realism and pacifism?

Why is the just war theory considered a middle path between realism and pacifism?