The Yuan was unusually sea-minded, attempting numerous maritime expeditions. After the Mongol invasions of Japan (1274, 900 ships, and in 1281, 4400 ships), Mongol invasion of Champa (1282), Mongol invasion of Java (1292, 1000 ships), in 1291 the Yuan attempted but did not ultimately proceed with an invasion of the Ryukyu Islands. However, none of these invasions were successful. Kublai contemplated launching a third invasion of Japan but was forced to back down due to fierce public disapproval. The Yuan era naval advances has been described as a successor of the Song dynasty achievements and an antecedent of the Ming's treasure fleets. An important function of the Yuan navy was the shipping of grain from the South to the capital of modern-day Beijing. There was fierce 50-year interdepartmental rivalry between the fleets shipping by the Grand Canal and shipping by the Yellow Sea, which ended with the eventual dominance of the Grand Canal in China until modern times. The failed invasions also demonstrated a weakness of the Mongols – the inability to mount naval invasions successfully