Btw: The japanese sweets are called wagashi.
Here's some info:
The History of Wagashi
The origin of Wagashi dates back to the Yayoi Era (B.C.300-A.C.300), when it was no more than natural fruit, berries, and nuts. ?Wagashi? was greatly influenced by the grain processing skills that were introduced from China along with the Buddhist culture during the Nara Era (A.C.710-784), and people started to make Mochi and Dango (different forms of rice cakes). However, these were mainly used for religious purposes and were too exclusive for the average person. The basic forms of most Wagashi we see today come from that era.
Japanese confectioneries made remarkable strides during the late Muromachi Era when Japan was exposed to foreign trade. Trade with Portugal and Spain brought new recipes and ingredients, which profoundly influenced ?Wagashi? making. The introduction of sugar revolutionized the formula for sweetness, which until then had largely depended on the natural flavor of the ingredients, and spurred further development.
By the time the art of Wagashi-making had matured during the early Edo Period (A.C.1603-1867), the ?Wagashi? trade was experiencing great competition and development in Kyoto, Edo, and other regions. Average people were enjoying them as well. The excellent Wagashis developed during this period are practically identical to the ones we see today Its usage diversified also, as they started to appear in tea ceremonies, afternoon snacks, and gifts. It is often served with tea. Now it is mostly eaten on celebrations.