Is there any effective way to prevent war?

I think so. In order for a country to declare war it must think that it has a legitimate reason to do so and it must think there is a chance it can succeed. The best way to prevent war is to make everyone else think they are "lesser than" and that it would be hopeless and frivolous to start a war. Intimidation and oppression can go a long way if done properly.