HONG KONG—Reacting to anti-Japan protests that struck parts of China over the weekend, some of Japan's largest companies on Monday shut factories, advised their employees to stay home and closed shops, moves that have aggravated tensions between the world's second and third-largest economies.

Panasonic Corp. shut a factory in Qingdao city, Shandong province, after demonstrators over the weekend shattered the factory's windows, destroyed some of its equipment and set the building on fire, according to Beijing-based spokesman....