In 1870, Germans took over the rich industrial region of Alsace-Lorraine in France in a short war. Therefore, the french built up their industries and armies to get the region back from the Germans.
Russia lost a war In 1905 against Japan which encouraged them to build up a large army because they could not afford to lose another conflict.
The German Kaiser thought that Germany should have many oversea colonies and an empire like many other countries. They already had colonies but they wanted war. This could have been a cause of the war because other countries were scared of its power.