If you put Germany up against a navally superior opponent before the Haber Process is invented and the relevant infrastructure created for it so that they can make nitrates without importing them, they're in for a world of hurt.
That said, others have raised the very valid point that, contrary to stereotype, in the real world there was not a chain of rigid unbreakable alliances that sprang in 1914 like tripwires; there was a very fluid diplomatic situation where great powers' relations with each other were vastly more complicated than "on your side" vs "not on your side". Most of the powers that went to war in 1914 were not obliged to do so by firm commitments, they were not monolithic blocs but rather had different decision-makers who had different ideas of what lay in the national interest, and those men's reasoning was much more complicated than popular caricatures (e.g. the silly old myth that British foreign policy is a simple case of selecting the most powerful country on the Continent and deciding to make it an enemy) would suggest. The July Crisis gave us a snapshot of the ever-shifting picture of European diplomatic relations, not a complete picture. Some things genuinely were unshakable by that stage but, of all the relations between the European great powers, Franco-German enmity, Austro-Russian enmity and Russo-Ottoman enmity are the only things I can't think of any way to get rid of in that timeframe. So there's no guarantee whatsoever that we'll even have a First World War with the same sides as OTL's.
That said, if we somehow did end up with a First World War with the same sides as OTL even just a few years before its OTL outbreak, it certainly wouldn't be long, and the Germans certainly wouldn't be on the winning side. Supplying war may bore people but it's usually more important than the flashy "but what if X side won Y battle because of Z amazing brilliant general?" question. At risk of stating the totally obvious, it's rather tricky to conduct a war without explosives.